home *** CD-ROM | disk | FTP | other *** search
/ HyperLib 1997 Winter - Disc 1 / HYPERLIB-1997-Winter-CD1.ISO.7z / HYPERLIB-1997-Winter-CD1.ISO / オンラインウェア / BUS / BibTeX 1.06 FAT.sit / BibTeX ƒ / Source code / BibTeX.cc < prev    next >
Text File  |  1996-06-04  |  234KB  |  10,267 lines

  1. //###################################################################
  2. //
  3. // FILE: "BibTeX.cc"
  4. //                                   created: 2/2/96 {10:03:20 am} 
  5. //                               last update: 11/4/96 {2:38:13 pm} 
  6. // Author: Vince Darley
  7. // E-mail: <mailto:vince@das.harvard.edu>
  8. //   mail: Division of Applied Sciences, Harvard University
  9. //         Oxford Street, Cambridge MA 02138, USA
  10. //    www: <http://www.fas.harvard.edu/~darley/>
  11. // 
  12. // This is the basic source to BibTeX, grabbed off an old mac port
  13. // on CTAN in C, which I ported to C++ (proper function
  14. // declarations and prototypes), and ported further to compile
  15. // under Codewarrior 8.
  16. // 
  17. // The code and porting is a bit of a mess. First because the code
  18. // comes out of web2c, and second because this is a port of a port.
  19. // Most of the work is actually just done by a bunch of '#define's
  20. // which get rid of all unix stdio stuff.
  21. // 
  22. //###################################################################
  23.  
  24. // uncomment this to have a close look
  25. // at what's going on and generate
  26. // enormous .blg files
  27. //#define TRACE
  28.  
  29. #undef __profile__
  30.  
  31. #ifdef __profile__
  32. #pragma profile on
  33. #endif
  34.  
  35. // we call WaitNextEvent occasionally
  36. #define GIVE_UP_TIME
  37.  
  38. #include "CBibTeXApp.h"
  39. extern CBibtexApp* theAppPointer;
  40. #include "BibTeX.h"
  41. jmp_buf jmp9998, jmp32; int lab31=0;
  42. /* 9998 9999 31 32 9932 */ 
  43.  
  44. /* 
  45.  * Changed the following from
  46.  * #def's to const's
  47.  */
  48. short bufsize;
  49. short minprintline;
  50. short maxprintline;
  51. const short auxstacksize = 20;
  52. short maxbibfiles;
  53. long poolsize;
  54. short maxstrings;
  55. short maxcites;
  56. short mincrossrefs;
  57. short wizfnspace;
  58. const short singlefnspace = 100;
  59. short maxentints;
  60. short maxentstrs;
  61. const short entstrsize = 100;
  62. const short globstrsize = 1000;
  63. short maxfields;
  64. const short litstksize = 100;
  65. const short numbltinfns = 37;
  66. short hashsize;
  67.  
  68. #include "BibTeX.p"
  69. #include "bibutils.h"
  70. #include "globals.h"
  71. #include "file-io.h"
  72. #include <string.h>
  73.  
  74. #define ReverseFPuts(a,b) FPutS(b,a)
  75. #define fclose(a) CloseFile(a)
  76. extern const char      *aux_fn;
  77. #ifdef stdout
  78. #undef stdout
  79. #endif
  80. // so that stdout actually goes to a log window
  81. #define stdout 0
  82. //#define lineread(f,size) ReadLine(f)
  83.  
  84. integer bad  ; 
  85. schar history  ; 
  86. integer errcount  ; 
  87. ASCIIcode xord[128]  ; 
  88. unsigned char xchr[256]  ; 
  89. lextype lexclass[128]  ; 
  90. idtype idclass[128]  ; 
  91. integer charwidth[128]  ; 
  92. /* 
  93.  * Changed by Vince from stringwidth -> bibstringwidth 
  94.  * to avoid a name clash.
  95.  */
  96. integer bibstringwidth  ; 
  97. char nameoffile[1025], realnameoffile[1025]  ; 
  98. short namelength  ; 
  99. short nameptr  ; 
  100. buftype buffer  ; 
  101. bufpointer last  ; 
  102. buftype svbuffer  ; 
  103. bufpointer svptr1  ; 
  104. bufpointer svptr2  ; 
  105. integer tmpptr, tmpendptr  ; 
  106. ASCIIcode *strpool; 
  107. poolpointer poolptr  ; 
  108. strnumber strptr  ; 
  109. strnumber strnum  ; 
  110. poolpointer pptr1, pptr2  ; 
  111. hashpointer *hashnext;
  112. strnumber *hashtext;
  113. strilk *hashilk;
  114. integer *ilkinfo;
  115. short hashused  ; 
  116. boolean hashfound  ; 
  117. hashloc dummyloc  ; 
  118. strnumber sauxextension  ; 
  119. strnumber slogextension  ; 
  120. strnumber sbblextension  ; 
  121. strnumber sbstextension  ; 
  122. strnumber sbibextension  ; 
  123. strnumber sbstarea  ; 
  124. strnumber sbibarea  ; 
  125. hashloc predefloc  ; 
  126. integer commandnum  ; 
  127. bufpointer bufptr1  ; 
  128. bufpointer bufptr2  ; 
  129. schar scanresult  ; 
  130. integer tokenvalue  ; 
  131. short auxnamelength  ; 
  132. alphafile auxfile[auxstacksize + 1]  ; 
  133. strnumber auxlist[auxstacksize + 1]  ; 
  134. integer auxlnstack[auxstacksize + 1]  ; 
  135. auxnumber auxptr  ; 
  136. strnumber toplevstr  ; 
  137. alphafile logfile  ; 
  138. alphafile bblfile  ; 
  139. bibnumber bibptr  ; 
  140. bibnumber numbibfiles  ; 
  141. boolean bibseen  ; 
  142. boolean bstseen  ; 
  143. strnumber bststr  ; 
  144. alphafile bstfile  ; 
  145. strnumber *citelist; 
  146. citenumber citeptr  ; 
  147. citenumber entryciteptr  ; 
  148. citenumber numcites  ; 
  149. citenumber oldnumcites  ; 
  150. boolean citationseen  ; 
  151. hashloc citeloc  ; 
  152. hashloc lcciteloc  ; 
  153. hashloc lcxciteloc  ; 
  154. boolean citefound  ; 
  155. boolean allentries  ; 
  156. citenumber allmarker  ; 
  157. integer bbllinenum  ; 
  158. integer bstlinenum  ; 
  159. hashloc fnloc  ; 
  160. hashloc wizloc  ; 
  161. hashloc literalloc  ; 
  162. hashloc macronameloc  ; 
  163. hashloc macrodefloc  ;
  164. fnclass *fntype; 
  165. wizfnloc wizdefptr  ; 
  166. wizfnloc wizfnptr  ; 
  167. hashptr2 *wizfunctions; 
  168. intentloc intentptr  ; 
  169. integer *entryints; 
  170. intentloc numentints  ; 
  171. strentloc strentptr  ; 
  172. ASCIIcode (*entrystrs)[entstrsize + 1]  ; 
  173. strentloc numentstrs  ; 
  174. schar strglbptr  ; 
  175. strnumber glbstrptr[10]  ; 
  176. ASCIIcode (*globalstrs)[globstrsize + 1]  ; 
  177. integer glbstrend[10]  ; 
  178. schar numglbstrs  ; 
  179. fieldloc fieldptr  ; 
  180. fieldloc fieldparentptr, fieldendptr  ; 
  181. citenumber citeparentptr, citexptr  ; 
  182. strnumber *fieldinfo; 
  183. fieldloc numfields  ; 
  184. fieldloc numpredefinedfields  ; 
  185. fieldloc crossrefnum  ; 
  186. boolean nofields  ; 
  187. boolean entryseen  ; 
  188. boolean readseen  ; 
  189. boolean readperformed  ; 
  190. boolean readingcompleted  ; 
  191. boolean readcompleted  ; 
  192. integer implfnnum  ; 
  193. integer biblinenum  ; 
  194. hashloc entrytypeloc  ; 
  195. boolean typeexists  ; 
  196. boolean storeentry  ; 
  197. hashloc fieldnameloc  ; 
  198. hashloc fieldvalloc  ; 
  199. boolean storefield  ; 
  200. boolean storetoken  ; 
  201. ASCIIcode rightouterdelim  ; 
  202. ASCIIcode rightstrdelim  ; 
  203. boolean atbibcommand  ; 
  204. hashloc curmacroloc  ; 
  205. strnumber *citeinfo; 
  206. boolean citehashfound  ; 
  207. bibnumber preambleptr  ; 
  208. bibnumber numpreamblestrings  ; 
  209. integer bibbracelevel  ; 
  210. integer litstack[litstksize + 1]  ; 
  211. stktype litstktype[litstksize + 1]  ; 
  212. litstkloc litstkptr  ; 
  213. strnumber cmdstrptr  ; 
  214. integer entchrptr  ; 
  215. integer globchrptr  ; 
  216. buftype exbuf  ; 
  217. bufpointer exbufptr  ; 
  218. bufpointer exbuflength  ; 
  219. buftype outbuf  ; 
  220. bufpointer outbufptr  ; 
  221. bufpointer outbuflength  ; 
  222. boolean messwithentries  ; 
  223. citenumber sortciteptr  ; 
  224. strentloc sortkeynum  ; 
  225. integer bracelevel  ; 
  226. hashloc bequals  ; 
  227. hashloc bgreaterthan  ; 
  228. hashloc blessthan  ; 
  229. hashloc bplus  ; 
  230. hashloc bminus  ; 
  231. hashloc bconcatenate  ; 
  232. hashloc bgets  ; 
  233. hashloc baddperiod  ; 
  234. hashloc bcalltype  ; 
  235. hashloc bchangecase  ; 
  236. hashloc bchrtoint  ; 
  237. hashloc bcite  ; 
  238. hashloc bduplicate  ; 
  239. hashloc bempty  ; 
  240. hashloc bformatname  ; 
  241. hashloc bif  ; 
  242. hashloc binttochr  ; 
  243. hashloc binttostr  ; 
  244. hashloc bmissing  ; 
  245. hashloc bnewline  ; 
  246. hashloc bnumnames  ; 
  247. hashloc bpop  ; 
  248. hashloc bpreamble  ; 
  249. hashloc bpurify  ; 
  250. hashloc bquote  ; 
  251. hashloc bskip  ; 
  252. hashloc bstack  ; 
  253. hashloc bsubstring  ; 
  254. hashloc bswap  ; 
  255. hashloc btextlength  ; 
  256. hashloc btextprefix  ; 
  257. hashloc btopstack  ; 
  258. hashloc btype  ; 
  259. hashloc bwarning  ; 
  260. hashloc bwhile  ; 
  261. hashloc bwidth  ; 
  262. hashloc bwrite  ; 
  263. hashloc bdefault  ; 
  264. #ifdef STAT
  265. hashloc bltinloc[numbltinfns + 1]  ; 
  266. integer executioncount[numbltinfns + 1]  ; 
  267. integer totalexcount  ; 
  268. bltinrange bltinptr  ; 
  269. #endif /* STAT */
  270. strnumber snull  ; 
  271. strnumber sdefault  ; 
  272. strnumber st  ; 
  273. strnumber sl  ; 
  274. strnumber su  ; 
  275. integer poplit1, poplit2, poplit3  ; 
  276. stktype poptyp1, poptyp2, poptyp3  ; 
  277. poolpointer spptr  ; 
  278. poolpointer spxptr1, spxptr2  ; 
  279. poolpointer spend  ; 
  280. poolpointer splength, sp2length  ; 
  281. integer spbracelevel  ; 
  282. bufpointer exbufxptr, exbufyptr  ; 
  283. hashloc controlseqloc  ; 
  284. boolean precedingwhite  ; 
  285. boolean andfound  ; 
  286. integer numnames  ; 
  287. bufpointer namebfptr  ; 
  288. bufpointer namebfxptr, namebfyptr  ; 
  289. integer nmbracelevel  ; 
  290. bufpointer *nametok; 
  291. ASCIIcode *namesepchar; 
  292. bufpointer numtokens  ; 
  293. boolean tokenstarting  ; 
  294. boolean alphafound  ; 
  295. boolean doubleletter, endofgroup, tobewritten  ; 
  296. bufpointer firststart  ; 
  297. bufpointer firstend  ; 
  298. bufpointer lastend  ; 
  299. bufpointer vonstart  ; 
  300. bufpointer vonend  ; 
  301. bufpointer jrend  ; 
  302. bufpointer curtoken, lasttoken  ; 
  303. boolean usedefault  ; 
  304. bufpointer numcommas  ; 
  305. bufpointer comma1, comma2  ; 
  306. bufpointer numtextchars  ; 
  307. schar conversiontype  ; 
  308. boolean prevcolon  ; 
  309. poolpointer* strstart ; 
  310. strnumber* biblist  ; 
  311. alphafile* bibfile ; 
  312. hashptr2* typelist ; 
  313. boolean* entryexists ; 
  314. strnumber* spreamble  ; 
  315.  
  316. #include "coerce.h"
  317.  
  318. void bstentrycommand (void) {
  319.     /* 10 */ if ( ( entryseen ) ) 
  320.   {
  321.     {
  322.       (void) ReverseFPuts( logfile ,  "Illegal, another entry command" ) ; 
  323.       (void) FPrintFStdErr(  "Illegal, another entry command" ) ; 
  324.     } 
  325.     {
  326.       bsterrprintandlookfo () ; 
  327.       goto lab10 ; 
  328.     } 
  329.   } 
  330.   entryseen = true ; 
  331.   {
  332.     if ( ( ! eatbstwhitespace () ) ) 
  333.     {
  334.       eatbstprint () ; 
  335.       {
  336.     {
  337.       (void) ReverseFPuts( logfile ,  "entry" ) ; 
  338.       (void) FPrintFStdErr(  "entry" ) ; 
  339.     } 
  340.     {
  341.       bsterrprintandlookfo () ; 
  342.       goto lab10 ; 
  343.     } 
  344.       } 
  345.     } 
  346.   } 
  347.   {
  348.     {
  349.       if ( ( buffer [ bufptr2 ] != 123 ) ) 
  350.       {
  351.     bstleftbraceprint () ; 
  352.     {
  353.       {
  354.         (void) ReverseFPuts( logfile ,  "entry" ) ; 
  355.         (void) FPrintFStdErr(  "entry" ) ; 
  356.       } 
  357.       {
  358.         bsterrprintandlookfo () ; 
  359.         goto lab10 ; 
  360.       } 
  361.     } 
  362.       } 
  363.       incr ( bufptr2 ) ; 
  364.     } 
  365.     {
  366.       if ( ( ! eatbstwhitespace () ) ) 
  367.       {
  368.     eatbstprint () ; 
  369.     {
  370.       {
  371.         (void) ReverseFPuts( logfile ,  "entry" ) ; 
  372.         (void) FPrintFStdErr(  "entry" ) ; 
  373.       } 
  374.       {
  375.         bsterrprintandlookfo () ; 
  376.         goto lab10 ; 
  377.       } 
  378.     } 
  379.       } 
  380.     } 
  381.     while ( ( buffer [ bufptr2 ] != 125 ) ) {
  382.     
  383.       {
  384.     scanidentifier ( 125 , 37 , 37 ) ; 
  385.     if ( ( ( scanresult == 3 ) || ( scanresult == 1 ) ) ) 
  386.     ; 
  387.     else {
  388.         
  389.       bstidprint () ; 
  390.       {
  391.         {
  392.           (void) ReverseFPuts( logfile ,  "entry" ) ; 
  393.           (void) FPrintFStdErr(  "entry" ) ; 
  394.         } 
  395.         {
  396.           bsterrprintandlookfo () ; 
  397.           goto lab10 ; 
  398.         } 
  399.       } 
  400.     } 
  401.       } 
  402.       {
  403.     ;
  404. #ifdef TRACE
  405.     {
  406.       outtoken ( logfile ) ; 
  407.     } 
  408.     {
  409.       (void) FPrintF( logfile , "%s¥r",  " is a field" ) ; 
  410.     } 
  411. #endif /* TRACE */
  412.     lowercase ( buffer , bufptr1 , ( bufptr2 - bufptr1 ) ) ; 
  413.     fnloc = strlookup ( buffer , bufptr1 , ( bufptr2 - bufptr1 ) , 11 , 
  414.     true ) ; 
  415.     {
  416.       if ( ( hashfound ) ) 
  417.       {
  418.         alreadyseenfunctionp ( fnloc ) ; 
  419.         goto lab10 ; 
  420.       } 
  421.     } 
  422.     fntype [ fnloc ] = 4 ; 
  423.     ilkinfo [ fnloc ] = numfields ; 
  424.     incr ( numfields ) ; 
  425.       } 
  426.       {
  427.     if ( ( ! eatbstwhitespace () ) ) 
  428.     {
  429.       eatbstprint () ; 
  430.       {
  431.         {
  432.           (void) ReverseFPuts( logfile ,  "entry" ) ; 
  433.           (void) FPrintFStdErr(  "entry" ) ; 
  434.         } 
  435.         {
  436.           bsterrprintandlookfo () ; 
  437.           goto lab10 ; 
  438.         } 
  439.       } 
  440.     } 
  441.       } 
  442.     } 
  443.     incr ( bufptr2 ) ; 
  444.   } 
  445.   {
  446.     if ( ( ! eatbstwhitespace () ) ) 
  447.     {
  448.       eatbstprint () ; 
  449.       {
  450.     {
  451.       (void) ReverseFPuts( logfile ,  "entry" ) ; 
  452.       (void) FPrintFStdErr(  "entry" ) ; 
  453.     } 
  454.     {
  455.       bsterrprintandlookfo () ; 
  456.       goto lab10 ; 
  457.     } 
  458.       } 
  459.     } 
  460.   } 
  461.   if ( ( numfields == numpredefinedfields ) ) 
  462.   {
  463.     {
  464.       (void) ReverseFPuts( logfile ,  "Warning--I didn't find any fields" ) ; 
  465.       (void) FPrintFStdErr(  "Warning--I didn't find any fields" ) ; 
  466.     } 
  467.     bstwarnprint () ; 
  468.   } 
  469.   {
  470.     {
  471.       if ( ( buffer [ bufptr2 ] != 123 ) ) 
  472.       {
  473.     bstleftbraceprint () ; 
  474.     {
  475.       {
  476.         (void) ReverseFPuts( logfile ,  "entry" ) ; 
  477.         (void) FPrintFStdErr(  "entry" ) ; 
  478.       } 
  479.       {
  480.         bsterrprintandlookfo () ; 
  481.         goto lab10 ; 
  482.       } 
  483.     } 
  484.       } 
  485.       incr ( bufptr2 ) ; 
  486.     } 
  487.     {
  488.       if ( ( ! eatbstwhitespace () ) ) 
  489.       {
  490.     eatbstprint () ; 
  491.     {
  492.       {
  493.         (void) ReverseFPuts( logfile ,  "entry" ) ; 
  494.         (void) FPrintFStdErr(  "entry" ) ; 
  495.       } 
  496.       {
  497.         bsterrprintandlookfo () ; 
  498.         goto lab10 ; 
  499.       } 
  500.     } 
  501.       } 
  502.     } 
  503.     while ( ( buffer [ bufptr2 ] != 125 ) ) {
  504.     
  505.       {
  506.     scanidentifier ( 125 , 37 , 37 ) ; 
  507.     if ( ( ( scanresult == 3 ) || ( scanresult == 1 ) ) ) 
  508.     ; 
  509.     else {
  510.         
  511.       bstidprint () ; 
  512.       {
  513.         {
  514.           (void) ReverseFPuts( logfile ,  "entry" ) ; 
  515.           (void) FPrintFStdErr(  "entry" ) ; 
  516.         } 
  517.         {
  518.           bsterrprintandlookfo () ; 
  519.           goto lab10 ; 
  520.         } 
  521.       } 
  522.     } 
  523.       } 
  524.       {
  525.     ;
  526. #ifdef TRACE
  527.     {
  528.       outtoken ( logfile ) ; 
  529.     } 
  530.     {
  531.       (void) FPrintF( logfile , "%s¥r",  " is an integer entry-variable" ) ; 
  532.     } 
  533. #endif /* TRACE */
  534.     lowercase ( buffer , bufptr1 , ( bufptr2 - bufptr1 ) ) ; 
  535.     fnloc = strlookup ( buffer , bufptr1 , ( bufptr2 - bufptr1 ) , 11 , 
  536.     true ) ; 
  537.     {
  538.       if ( ( hashfound ) ) 
  539.       {
  540.         alreadyseenfunctionp ( fnloc ) ; 
  541.         goto lab10 ; 
  542.       } 
  543.     } 
  544.     fntype [ fnloc ] = 5 ; 
  545.     ilkinfo [ fnloc ] = numentints ; 
  546.     incr ( numentints ) ; 
  547.       } 
  548.       {
  549.     if ( ( ! eatbstwhitespace () ) ) 
  550.     {
  551.       eatbstprint () ; 
  552.       {
  553.         {
  554.           (void) ReverseFPuts( logfile ,  "entry" ) ; 
  555.           (void) FPrintFStdErr(  "entry" ) ; 
  556.         } 
  557.         {
  558.           bsterrprintandlookfo () ; 
  559.           goto lab10 ; 
  560.         } 
  561.       } 
  562.     } 
  563.       } 
  564.     } 
  565.     incr ( bufptr2 ) ; 
  566.   } 
  567.   {
  568.     if ( ( ! eatbstwhitespace () ) ) 
  569.     {
  570.       eatbstprint () ; 
  571.       {
  572.     {
  573.       (void) ReverseFPuts( logfile ,  "entry" ) ; 
  574.       (void) FPrintFStdErr(  "entry" ) ; 
  575.     } 
  576.     {
  577.       bsterrprintandlookfo () ; 
  578.       goto lab10 ; 
  579.     } 
  580.       } 
  581.     } 
  582.   } 
  583.   {
  584.     {
  585.       if ( ( buffer [ bufptr2 ] != 123 ) ) 
  586.       {
  587.     bstleftbraceprint () ; 
  588.     {
  589.       {
  590.         (void) ReverseFPuts( logfile ,  "entry" ) ; 
  591.         (void) FPrintFStdErr(  "entry" ) ; 
  592.       } 
  593.       {
  594.         bsterrprintandlookfo () ; 
  595.         goto lab10 ; 
  596.       } 
  597.     } 
  598.       } 
  599.       incr ( bufptr2 ) ; 
  600.     } 
  601.     {
  602.       if ( ( ! eatbstwhitespace () ) ) 
  603.       {
  604.     eatbstprint () ; 
  605.     {
  606.       {
  607.         (void) ReverseFPuts( logfile ,  "entry" ) ; 
  608.         (void) FPrintFStdErr(  "entry" ) ; 
  609.       } 
  610.       {
  611.         bsterrprintandlookfo () ; 
  612.         goto lab10 ; 
  613.       } 
  614.     } 
  615.       } 
  616.     } 
  617.     while ( ( buffer [ bufptr2 ] != 125 ) ) {
  618.     
  619.       {
  620.     scanidentifier ( 125 , 37 , 37 ) ; 
  621.     if ( ( ( scanresult == 3 ) || ( scanresult == 1 ) ) ) 
  622.     ; 
  623.     else {
  624.         
  625.       bstidprint () ; 
  626.       {
  627.         {
  628.           (void) ReverseFPuts( logfile ,  "entry" ) ; 
  629.           (void) FPrintFStdErr(  "entry" ) ; 
  630.         } 
  631.         {
  632.           bsterrprintandlookfo () ; 
  633.           goto lab10 ; 
  634.         } 
  635.       } 
  636.     } 
  637.       } 
  638.       {
  639.     ;
  640. #ifdef TRACE
  641.     {
  642.       outtoken ( logfile ) ; 
  643.     } 
  644.     {
  645.       (void) FPrintF( logfile , "%s¥r",  " is a string entry-variable" ) ; 
  646.     } 
  647. #endif /* TRACE */
  648.     lowercase ( buffer , bufptr1 , ( bufptr2 - bufptr1 ) ) ; 
  649.     fnloc = strlookup ( buffer , bufptr1 , ( bufptr2 - bufptr1 ) , 11 , 
  650.     true ) ; 
  651.     {
  652.       if ( ( hashfound ) ) 
  653.       {
  654.         alreadyseenfunctionp ( fnloc ) ; 
  655.         goto lab10 ; 
  656.       } 
  657.     } 
  658.     fntype [ fnloc ] = 6 ; 
  659.     ilkinfo [ fnloc ] = numentstrs ; 
  660.     incr ( numentstrs ) ; 
  661.       } 
  662.       {
  663.     if ( ( ! eatbstwhitespace () ) ) 
  664.     {
  665.       eatbstprint () ; 
  666.       {
  667.         {
  668.           (void) ReverseFPuts( logfile ,  "entry" ) ; 
  669.           (void) FPrintFStdErr(  "entry" ) ; 
  670.         } 
  671.         {
  672.           bsterrprintandlookfo () ; 
  673.           goto lab10 ; 
  674.         } 
  675.       } 
  676.     } 
  677.       } 
  678.     } 
  679.     incr ( bufptr2 ) ; 
  680.   } 
  681.   lab10: ; 
  682. boolean badargumenttoken () {
  683.     /* 10 */ register boolean Result; Result = true 
  684.   ; 
  685.   lowercase ( buffer , bufptr1 , ( bufptr2 - bufptr1 ) ) ; 
  686.   fnloc = strlookup ( buffer , bufptr1 , ( bufptr2 - bufptr1 ) , 11 , false ) 
  687.   ; 
  688.   if ( ( ! hashfound ) ) 
  689.   {
  690.     printatoken () ; 
  691.     {
  692.       {
  693.     (void) ReverseFPuts( logfile ,  " is an unknown function" ) ; 
  694.     (void) FPrintFStdErr(  " is an unknown function" ) ; 
  695.       } 
  696.       {
  697.     bsterrprintandlookfo () ; 
  698.     goto lab10 ; 
  699.       } 
  700.     } 
  701.   } 
  702.   else if ( ( ( fntype [ fnloc ] != 0 ) && ( fntype [ fnloc ] != 1 ) ) ) 
  703.   {
  704.     printatoken () ; 
  705.     {
  706.       (void) ReverseFPuts( logfile ,  " has bad function type " ) ; 
  707.       (void) FPrintFStdErr(  " has bad function type " ) ; 
  708.     } 
  709.     printfnclass ( fnloc ) ; 
  710.     {
  711.       bsterrprintandlookfo () ; 
  712.       goto lab10 ; 
  713.     } 
  714.   } 
  715.   Result = false ; 
  716.   lab10: ; 
  717.   return(Result) ; 
  718. void bstexecutecommand (void) {
  719.     /* 10 */ if ( ( ! readseen ) ) 
  720.   {
  721.     {
  722.       (void) ReverseFPuts( logfile ,  "Illegal, execute command before read command" ) ; 
  723.       (void) FPrintFStdErr(  "Illegal, execute command before read command" ) ; 
  724.     } 
  725.     {
  726.       bsterrprintandlookfo () ; 
  727.       goto lab10 ; 
  728.     } 
  729.   } 
  730.   {
  731.     if ( ( ! eatbstwhitespace () ) ) 
  732.     {
  733.       eatbstprint () ; 
  734.       {
  735.     {
  736.       (void) ReverseFPuts( logfile ,  "execute" ) ; 
  737.       (void) FPrintFStdErr(  "execute" ) ; 
  738.     } 
  739.     {
  740.       bsterrprintandlookfo () ; 
  741.       goto lab10 ; 
  742.     } 
  743.       } 
  744.     } 
  745.   } 
  746.   {
  747.     if ( ( buffer [ bufptr2 ] != 123 ) ) 
  748.     {
  749.       bstleftbraceprint () ; 
  750.       {
  751.     {
  752.       (void) ReverseFPuts( logfile ,  "execute" ) ; 
  753.       (void) FPrintFStdErr(  "execute" ) ; 
  754.     } 
  755.     {
  756.       bsterrprintandlookfo () ; 
  757.       goto lab10 ; 
  758.     } 
  759.       } 
  760.     } 
  761.     incr ( bufptr2 ) ; 
  762.   } 
  763.   {
  764.     if ( ( ! eatbstwhitespace () ) ) 
  765.     {
  766.       eatbstprint () ; 
  767.       {
  768.     {
  769.       (void) ReverseFPuts( logfile ,  "execute" ) ; 
  770.       (void) FPrintFStdErr(  "execute" ) ; 
  771.     } 
  772.     {
  773.       bsterrprintandlookfo () ; 
  774.       goto lab10 ; 
  775.     } 
  776.       } 
  777.     } 
  778.   } 
  779.   {
  780.     scanidentifier ( 125 , 37 , 37 ) ; 
  781.     if ( ( ( scanresult == 3 ) || ( scanresult == 1 ) ) ) 
  782.     ; 
  783.     else {
  784.     
  785.       bstidprint () ; 
  786.       {
  787.     {
  788.       (void) ReverseFPuts( logfile ,  "execute" ) ; 
  789.       (void) FPrintFStdErr(  "execute" ) ; 
  790.     } 
  791.     {
  792.       bsterrprintandlookfo () ; 
  793.       goto lab10 ; 
  794.     } 
  795.       } 
  796.     } 
  797.   } 
  798.   {
  799.     ;
  800. #ifdef TRACE
  801.     {
  802.       outtoken ( logfile ) ; 
  803.     } 
  804.     {
  805.       (void) FPrintF( logfile , "%s¥r",  " is a to be executed function" ) ; 
  806.     } 
  807. #endif /* TRACE */
  808.     if ( ( badargumenttoken () ) ) 
  809.     goto lab10 ; 
  810.   } 
  811.   {
  812.     if ( ( ! eatbstwhitespace () ) ) 
  813.     {
  814.       eatbstprint () ; 
  815.       {
  816.     {
  817.       (void) ReverseFPuts( logfile ,  "execute" ) ; 
  818.       (void) FPrintFStdErr(  "execute" ) ; 
  819.     } 
  820.     {
  821.       bsterrprintandlookfo () ; 
  822.       goto lab10 ; 
  823.     } 
  824.       } 
  825.     } 
  826.   } 
  827.   {
  828.     if ( ( buffer [ bufptr2 ] != 125 ) ) 
  829.     {
  830.       bstrightbraceprint () ; 
  831.       {
  832.     {
  833.       (void) ReverseFPuts( logfile ,  "execute" ) ; 
  834.       (void) FPrintFStdErr(  "execute" ) ; 
  835.     } 
  836.     {
  837.       bsterrprintandlookfo () ; 
  838.       goto lab10 ; 
  839.     } 
  840.       } 
  841.     } 
  842.     incr ( bufptr2 ) ; 
  843.   } 
  844.   {
  845.     initcommandexecution () ; 
  846.     messwithentries = false ; 
  847.     executefn ( fnloc ) ; 
  848.     checkcommandexecutio () ; 
  849.   } 
  850.   lab10: ; 
  851. void bstfunctioncommand (void) {
  852.     /* 10 */ { 
  853.     if ( ( ! eatbstwhitespace () ) ) 
  854.     {
  855.       eatbstprint () ; 
  856.       {
  857.     {
  858.       (void) ReverseFPuts( logfile ,  "function" ) ; 
  859.       (void) FPrintFStdErr(  "function" ) ; 
  860.     } 
  861.     {
  862.       bsterrprintandlookfo () ; 
  863.       goto lab10 ; 
  864.     } 
  865.       } 
  866.     } 
  867.   } 
  868.   {
  869.     {
  870.       if ( ( buffer [ bufptr2 ] != 123 ) ) 
  871.       {
  872.     bstleftbraceprint () ; 
  873.     {
  874.       {
  875.         (void) ReverseFPuts( logfile ,  "function" ) ; 
  876.         (void) FPrintFStdErr(  "function" ) ; 
  877.       } 
  878.       {
  879.         bsterrprintandlookfo () ; 
  880.         goto lab10 ; 
  881.       } 
  882.     } 
  883.       } 
  884.       incr ( bufptr2 ) ; 
  885.     } 
  886.     {
  887.       if ( ( ! eatbstwhitespace () ) ) 
  888.       {
  889.     eatbstprint () ; 
  890.     {
  891.       {
  892.         (void) ReverseFPuts( logfile ,  "function" ) ; 
  893.         (void) FPrintFStdErr(  "function" ) ; 
  894.       } 
  895.       {
  896.         bsterrprintandlookfo () ; 
  897.         goto lab10 ; 
  898.       } 
  899.     } 
  900.       } 
  901.     } 
  902.     {
  903.       scanidentifier ( 125 , 37 , 37 ) ; 
  904.       if ( ( ( scanresult == 3 ) || ( scanresult == 1 ) ) ) 
  905.       ; 
  906.       else {
  907.       
  908.     bstidprint () ; 
  909.     {
  910.       {
  911.         (void) ReverseFPuts( logfile ,  "function" ) ; 
  912.         (void) FPrintFStdErr(  "function" ) ; 
  913.       } 
  914.       {
  915.         bsterrprintandlookfo () ; 
  916.         goto lab10 ; 
  917.       } 
  918.     } 
  919.       } 
  920.     } 
  921.     {
  922.     ;
  923. #ifdef TRACE
  924.       {
  925.     outtoken ( logfile ) ; 
  926.       } 
  927.       {
  928.     (void) FPrintF( logfile , "%s¥r",  " is a wizard-defined function" ) ; 
  929.       } 
  930. #endif /* TRACE */
  931.       lowercase ( buffer , bufptr1 , ( bufptr2 - bufptr1 ) ) ; 
  932.       wizloc = strlookup ( buffer , bufptr1 , ( bufptr2 - bufptr1 ) , 11 , 
  933.       true ) ; 
  934.       {
  935.     if ( ( hashfound ) ) 
  936.     {
  937.       alreadyseenfunctionp ( wizloc ) ; 
  938.       goto lab10 ; 
  939.     } 
  940.       } 
  941.       fntype [ wizloc ] = 1 ; 
  942.       if ( ( hashtext [ wizloc ] == sdefault ) ) 
  943.       bdefault = wizloc ; 
  944.     } 
  945.     {
  946.       if ( ( ! eatbstwhitespace () ) ) 
  947.       {
  948.     eatbstprint () ; 
  949.     {
  950.       {
  951.         (void) ReverseFPuts( logfile ,  "function" ) ; 
  952.         (void) FPrintFStdErr(  "function" ) ; 
  953.       } 
  954.       {
  955.         bsterrprintandlookfo () ; 
  956.         goto lab10 ; 
  957.       } 
  958.     } 
  959.       } 
  960.     } 
  961.     {
  962.       if ( ( buffer [ bufptr2 ] != 125 ) ) 
  963.       {
  964.     bstrightbraceprint () ; 
  965.     {
  966.       {
  967.         (void) ReverseFPuts( logfile ,  "function" ) ; 
  968.         (void) FPrintFStdErr(  "function" ) ; 
  969.       } 
  970.       {
  971.         bsterrprintandlookfo () ; 
  972.         goto lab10 ; 
  973.       } 
  974.     } 
  975.       } 
  976.       incr ( bufptr2 ) ; 
  977.     } 
  978.   } 
  979.   {
  980.     if ( ( ! eatbstwhitespace () ) ) 
  981.     {
  982.       eatbstprint () ; 
  983.       {
  984.     {
  985.       (void) ReverseFPuts( logfile ,  "function" ) ; 
  986.       (void) FPrintFStdErr(  "function" ) ; 
  987.     } 
  988.     {
  989.       bsterrprintandlookfo () ; 
  990.       goto lab10 ; 
  991.     } 
  992.       } 
  993.     } 
  994.   } 
  995.   {
  996.     if ( ( buffer [ bufptr2 ] != 123 ) ) 
  997.     {
  998.       bstleftbraceprint () ; 
  999.       {
  1000.     {
  1001.       (void) ReverseFPuts( logfile ,  "function" ) ; 
  1002.       (void) FPrintFStdErr(  "function" ) ; 
  1003.     } 
  1004.     {
  1005.       bsterrprintandlookfo () ; 
  1006.       goto lab10 ; 
  1007.     } 
  1008.       } 
  1009.     } 
  1010.     incr ( bufptr2 ) ; 
  1011.   } 
  1012.   scanfndef ( wizloc ) ; 
  1013.   lab10: ; 
  1014. void bstintegerscommand (void) {
  1015.     /* 10 */ { 
  1016.     if ( ( ! eatbstwhitespace () ) ) 
  1017.     {
  1018.       eatbstprint () ; 
  1019.       {
  1020.     {
  1021.       (void) ReverseFPuts( logfile ,  "integers" ) ; 
  1022.       (void) FPrintFStdErr(  "integers" ) ; 
  1023.     } 
  1024.     {
  1025.       bsterrprintandlookfo () ; 
  1026.       goto lab10 ; 
  1027.     } 
  1028.       } 
  1029.     } 
  1030.   } 
  1031.   {
  1032.     if ( ( buffer [ bufptr2 ] != 123 ) ) 
  1033.     {
  1034.       bstleftbraceprint () ; 
  1035.       {
  1036.     {
  1037.       (void) ReverseFPuts( logfile ,  "integers" ) ; 
  1038.       (void) FPrintFStdErr(  "integers" ) ; 
  1039.     } 
  1040.     {
  1041.       bsterrprintandlookfo () ; 
  1042.       goto lab10 ; 
  1043.     } 
  1044.       } 
  1045.     } 
  1046.     incr ( bufptr2 ) ; 
  1047.   } 
  1048.   {
  1049.     if ( ( ! eatbstwhitespace () ) ) 
  1050.     {
  1051.       eatbstprint () ; 
  1052.       {
  1053.     {
  1054.       (void) ReverseFPuts( logfile ,  "integers" ) ; 
  1055.       (void) FPrintFStdErr(  "integers" ) ; 
  1056.     } 
  1057.     {
  1058.       bsterrprintandlookfo () ; 
  1059.       goto lab10 ; 
  1060.     } 
  1061.       } 
  1062.     } 
  1063.   } 
  1064.   while ( ( buffer [ bufptr2 ] != 125 ) ) {
  1065.       
  1066.     {
  1067.       scanidentifier ( 125 , 37 , 37 ) ; 
  1068.       if ( ( ( scanresult == 3 ) || ( scanresult == 1 ) ) ) 
  1069.       ; 
  1070.       else {
  1071.       
  1072.     bstidprint () ; 
  1073.     {
  1074.       {
  1075.         (void) ReverseFPuts( logfile ,  "integers" ) ; 
  1076.         (void) FPrintFStdErr(  "integers" ) ; 
  1077.       } 
  1078.       {
  1079.         bsterrprintandlookfo () ; 
  1080.         goto lab10 ; 
  1081.       } 
  1082.     } 
  1083.       } 
  1084.     } 
  1085.     {
  1086.     ;
  1087. #ifdef TRACE
  1088.       {
  1089.     outtoken ( logfile ) ; 
  1090.       } 
  1091.       {
  1092.     (void) FPrintF( logfile , "%s¥r",  " is an integer global-variable" ) ; 
  1093.       } 
  1094. #endif /* TRACE */
  1095.       lowercase ( buffer , bufptr1 , ( bufptr2 - bufptr1 ) ) ; 
  1096.       fnloc = strlookup ( buffer , bufptr1 , ( bufptr2 - bufptr1 ) , 11 , true 
  1097.       ) ; 
  1098.       {
  1099.     if ( ( hashfound ) ) 
  1100.     {
  1101.       alreadyseenfunctionp ( fnloc ) ; 
  1102.       goto lab10 ; 
  1103.     } 
  1104.       } 
  1105.       fntype [ fnloc ] = 7 ; 
  1106.       ilkinfo [ fnloc ] = 0 ; 
  1107.     } 
  1108.     {
  1109.       if ( ( ! eatbstwhitespace () ) ) 
  1110.       {
  1111.     eatbstprint () ; 
  1112.     {
  1113.       {
  1114.         (void) ReverseFPuts( logfile ,  "integers" ) ; 
  1115.         (void) FPrintFStdErr(  "integers" ) ; 
  1116.       } 
  1117.       {
  1118.         bsterrprintandlookfo () ; 
  1119.         goto lab10 ; 
  1120.       } 
  1121.     } 
  1122.       } 
  1123.     } 
  1124.   } 
  1125.   incr ( bufptr2 ) ; 
  1126.   lab10: ; 
  1127. void bstiteratecommand (void) {
  1128.     /* 10 */ if ( ( ! readseen ) ) 
  1129.   {
  1130.     {
  1131.       (void) ReverseFPuts( logfile ,  "Illegal, iterate command before read command" ) ; 
  1132.       (void) FPrintFStdErr(  "Illegal, iterate command before read command" ) ; 
  1133.     } 
  1134.     {
  1135.       bsterrprintandlookfo () ; 
  1136.       goto lab10 ; 
  1137.     } 
  1138.   } 
  1139.   {
  1140.     if ( ( ! eatbstwhitespace () ) ) 
  1141.     {
  1142.       eatbstprint () ; 
  1143.       {
  1144.     {
  1145.       (void) ReverseFPuts( logfile ,  "iterate" ) ; 
  1146.       (void) FPrintFStdErr(  "iterate" ) ; 
  1147.     } 
  1148.     {
  1149.       bsterrprintandlookfo () ; 
  1150.       goto lab10 ; 
  1151.     } 
  1152.       } 
  1153.     } 
  1154.   } 
  1155.   {
  1156.     if ( ( buffer [ bufptr2 ] != 123 ) ) 
  1157.     {
  1158.       bstleftbraceprint () ; 
  1159.       {
  1160.     {
  1161.       (void) ReverseFPuts( logfile ,  "iterate" ) ; 
  1162.       (void) FPrintFStdErr(  "iterate" ) ; 
  1163.     } 
  1164.     {
  1165.       bsterrprintandlookfo () ; 
  1166.       goto lab10 ; 
  1167.     } 
  1168.       } 
  1169.     } 
  1170.     incr ( bufptr2 ) ; 
  1171.   } 
  1172.   {
  1173.     if ( ( ! eatbstwhitespace () ) ) 
  1174.     {
  1175.       eatbstprint () ; 
  1176.       {
  1177.     {
  1178.       (void) ReverseFPuts( logfile ,  "iterate" ) ; 
  1179.       (void) FPrintFStdErr(  "iterate" ) ; 
  1180.     } 
  1181.     {
  1182.       bsterrprintandlookfo () ; 
  1183.       goto lab10 ; 
  1184.     } 
  1185.       } 
  1186.     } 
  1187.   } 
  1188.   {
  1189.     scanidentifier ( 125 , 37 , 37 ) ; 
  1190.     if ( ( ( scanresult == 3 ) || ( scanresult == 1 ) ) ) 
  1191.     ; 
  1192.     else {
  1193.     
  1194.       bstidprint () ; 
  1195.       {
  1196.     {
  1197.       (void) ReverseFPuts( logfile ,  "iterate" ) ; 
  1198.       (void) FPrintFStdErr(  "iterate" ) ; 
  1199.     } 
  1200.     {
  1201.       bsterrprintandlookfo () ; 
  1202.       goto lab10 ; 
  1203.     } 
  1204.       } 
  1205.     } 
  1206.   } 
  1207.   {
  1208.     ;
  1209. #ifdef TRACE
  1210.     {
  1211.       outtoken ( logfile ) ; 
  1212.     } 
  1213.     {
  1214.       (void) FPrintF( logfile , "%s¥r",  " is a to be iterated function" ) ; 
  1215.     } 
  1216. #endif /* TRACE */
  1217.     if ( ( badargumenttoken () ) ) 
  1218.     goto lab10 ; 
  1219.   } 
  1220.   {
  1221.     if ( ( ! eatbstwhitespace () ) ) 
  1222.     {
  1223.       eatbstprint () ; 
  1224.       {
  1225.     {
  1226.       (void) ReverseFPuts( logfile ,  "iterate" ) ; 
  1227.       (void) FPrintFStdErr(  "iterate" ) ; 
  1228.     } 
  1229.     {
  1230.       bsterrprintandlookfo () ; 
  1231.       goto lab10 ; 
  1232.     } 
  1233.       } 
  1234.     } 
  1235.   } 
  1236.   {
  1237.     if ( ( buffer [ bufptr2 ] != 125 ) ) 
  1238.     {
  1239.       bstrightbraceprint () ; 
  1240.       {
  1241.     {
  1242.       (void) ReverseFPuts( logfile ,  "iterate" ) ; 
  1243.       (void) FPrintFStdErr(  "iterate" ) ; 
  1244.     } 
  1245.     {
  1246.       bsterrprintandlookfo () ; 
  1247.       goto lab10 ; 
  1248.     } 
  1249.       } 
  1250.     } 
  1251.     incr ( bufptr2 ) ; 
  1252.   } 
  1253.   {
  1254.     initcommandexecution () ; 
  1255.     messwithentries = true ; 
  1256.     sortciteptr = 0 ; 
  1257.     while ( ( sortciteptr < numcites ) ) {
  1258.     
  1259.       citeptr = citeinfo [ sortciteptr ] ; 
  1260.     ;
  1261. #ifdef TRACE
  1262.       {
  1263.     outpoolstr ( logfile , hashtext [ fnloc ] ) ; 
  1264.       } 
  1265.       {
  1266.     (void) ReverseFPuts( logfile ,  " to be iterated on " ) ; 
  1267.       } 
  1268.       {
  1269.     outpoolstr ( logfile , citelist [ citeptr ] ) ; 
  1270.       } 
  1271.       {
  1272.     (void) FPutC('¥r', logfile );
  1273.       } 
  1274. #endif /* TRACE */
  1275.       executefn ( fnloc ) ; 
  1276.       checkcommandexecutio () ; 
  1277.       incr ( sortciteptr ) ; 
  1278.     } 
  1279.   } 
  1280.   lab10: ; 
  1281. void bstmacrocommand (void) {
  1282.     /* 10 */ if ( ( readseen ) ) 
  1283.   {
  1284.     {
  1285.       (void) ReverseFPuts( logfile ,  "Illegal, macro command after read command" ) ; 
  1286.       (void) FPrintFStdErr(  "Illegal, macro command after read command" ) ; 
  1287.     } 
  1288.     {
  1289.       bsterrprintandlookfo () ; 
  1290.       goto lab10 ; 
  1291.     } 
  1292.   } 
  1293.   {
  1294.     if ( ( ! eatbstwhitespace () ) ) 
  1295.     {
  1296.       eatbstprint () ; 
  1297.       {
  1298.     {
  1299.       (void) ReverseFPuts( logfile ,  "macro" ) ; 
  1300.       (void) FPrintFStdErr(  "macro" ) ; 
  1301.     } 
  1302.     {
  1303.       bsterrprintandlookfo () ; 
  1304.       goto lab10 ; 
  1305.     } 
  1306.       } 
  1307.     } 
  1308.   } 
  1309.   {
  1310.     {
  1311.       if ( ( buffer [ bufptr2 ] != 123 ) ) 
  1312.       {
  1313.     bstleftbraceprint () ; 
  1314.     {
  1315.       {
  1316.         (void) ReverseFPuts( logfile ,  "macro" ) ; 
  1317.         (void) FPrintFStdErr(  "macro" ) ; 
  1318.       } 
  1319.       {
  1320.         bsterrprintandlookfo () ; 
  1321.         goto lab10 ; 
  1322.       } 
  1323.     } 
  1324.       } 
  1325.       incr ( bufptr2 ) ; 
  1326.     } 
  1327.     {
  1328.       if ( ( ! eatbstwhitespace () ) ) 
  1329.       {
  1330.     eatbstprint () ; 
  1331.     {
  1332.       {
  1333.         (void) ReverseFPuts( logfile ,  "macro" ) ; 
  1334.         (void) FPrintFStdErr(  "macro" ) ; 
  1335.       } 
  1336.       {
  1337.         bsterrprintandlookfo () ; 
  1338.         goto lab10 ; 
  1339.       } 
  1340.     } 
  1341.       } 
  1342.     } 
  1343.     {
  1344.       scanidentifier ( 125 , 37 , 37 ) ; 
  1345.       if ( ( ( scanresult == 3 ) || ( scanresult == 1 ) ) ) 
  1346.       ; 
  1347.       else {
  1348.       
  1349.     bstidprint () ; 
  1350.     {
  1351.       {
  1352.         (void) ReverseFPuts( logfile ,  "macro" ) ; 
  1353.         (void) FPrintFStdErr(  "macro" ) ; 
  1354.       } 
  1355.       {
  1356.         bsterrprintandlookfo () ; 
  1357.         goto lab10 ; 
  1358.       } 
  1359.     } 
  1360.       } 
  1361.     } 
  1362.     {
  1363.     ;
  1364. #ifdef TRACE
  1365.       {
  1366.     outtoken ( logfile ) ; 
  1367.       } 
  1368.       {
  1369.     (void) FPrintF( logfile , "%s¥r",  " is a macro" ) ; 
  1370.       } 
  1371. #endif /* TRACE */
  1372.       lowercase ( buffer , bufptr1 , ( bufptr2 - bufptr1 ) ) ; 
  1373.       macronameloc = strlookup ( buffer , bufptr1 , ( bufptr2 - bufptr1 ) , 13 
  1374.       , true ) ; 
  1375.       if ( ( hashfound ) ) 
  1376.       {
  1377.     printatoken () ; 
  1378.     {
  1379.       {
  1380.         (void) ReverseFPuts( logfile ,  " is already defined as a macro" ) ; 
  1381.         (void) FPrintFStdErr(  " is already defined as a macro" ) ; 
  1382.       } 
  1383.       {
  1384.         bsterrprintandlookfo () ; 
  1385.         goto lab10 ; 
  1386.       } 
  1387.     } 
  1388.       } 
  1389.       ilkinfo [ macronameloc ] = hashtext [ macronameloc ] ; 
  1390.     } 
  1391.     {
  1392.       if ( ( ! eatbstwhitespace () ) ) 
  1393.       {
  1394.     eatbstprint () ; 
  1395.     {
  1396.       {
  1397.         (void) ReverseFPuts( logfile ,  "macro" ) ; 
  1398.         (void) FPrintFStdErr(  "macro" ) ; 
  1399.       } 
  1400.       {
  1401.         bsterrprintandlookfo () ; 
  1402.         goto lab10 ; 
  1403.       } 
  1404.     } 
  1405.       } 
  1406.     } 
  1407.     {
  1408.       if ( ( buffer [ bufptr2 ] != 125 ) ) 
  1409.       {
  1410.     bstrightbraceprint () ; 
  1411.     {
  1412.       {
  1413.         (void) ReverseFPuts( logfile ,  "macro" ) ; 
  1414.         (void) FPrintFStdErr(  "macro" ) ; 
  1415.       } 
  1416.       {
  1417.         bsterrprintandlookfo () ; 
  1418.         goto lab10 ; 
  1419.       } 
  1420.     } 
  1421.       } 
  1422.       incr ( bufptr2 ) ; 
  1423.     } 
  1424.   } 
  1425.   {
  1426.     if ( ( ! eatbstwhitespace () ) ) 
  1427.     {
  1428.       eatbstprint () ; 
  1429.       {
  1430.     {
  1431.       (void) ReverseFPuts( logfile ,  "macro" ) ; 
  1432.       (void) FPrintFStdErr(  "macro" ) ; 
  1433.     } 
  1434.     {
  1435.       bsterrprintandlookfo () ; 
  1436.       goto lab10 ; 
  1437.     } 
  1438.       } 
  1439.     } 
  1440.   } 
  1441.   {
  1442.     {
  1443.       if ( ( buffer [ bufptr2 ] != 123 ) ) 
  1444.       {
  1445.     bstleftbraceprint () ; 
  1446.     {
  1447.       {
  1448.         (void) ReverseFPuts( logfile ,  "macro" ) ; 
  1449.         (void) FPrintFStdErr(  "macro" ) ; 
  1450.       } 
  1451.       {
  1452.         bsterrprintandlookfo () ; 
  1453.         goto lab10 ; 
  1454.       } 
  1455.     } 
  1456.       } 
  1457.       incr ( bufptr2 ) ; 
  1458.     } 
  1459.     {
  1460.       if ( ( ! eatbstwhitespace () ) ) 
  1461.       {
  1462.     eatbstprint () ; 
  1463.     {
  1464.       {
  1465.         (void) ReverseFPuts( logfile ,  "macro" ) ; 
  1466.         (void) FPrintFStdErr(  "macro" ) ; 
  1467.       } 
  1468.       {
  1469.         bsterrprintandlookfo () ; 
  1470.         goto lab10 ; 
  1471.       } 
  1472.     } 
  1473.       } 
  1474.     } 
  1475.     if ( ( buffer [ bufptr2 ] != 34 ) ) 
  1476.     {
  1477.       {
  1478.     (void) FPrintF( logfile , "%s%c%s",  "A macro definition must be " , xchr [ 34 ] ,         "-delimited" ) ; 
  1479.     (void) FPrintFStdErr( "%s%c%s",  "A macro definition must be " , xchr [ 34 ] ,         "-delimited" ) ; 
  1480.       } 
  1481.       {
  1482.     bsterrprintandlookfo () ; 
  1483.     goto lab10 ; 
  1484.       } 
  1485.     } 
  1486.     {
  1487.       incr ( bufptr2 ) ; 
  1488.       if ( ( ! scan1 ( 34 ) ) ) 
  1489.       {
  1490.     {
  1491.       (void) FPrintF( logfile , "%s%c%s",  "There's no `" , xchr [ 34 ] ,           "' to end macro definition" ) ; 
  1492.       (void) FPrintFStdErr( "%s%c%s",  "There's no `" , xchr [ 34 ] ,           "' to end macro definition" ) ; 
  1493.     } 
  1494.     {
  1495.       bsterrprintandlookfo () ; 
  1496.       goto lab10 ; 
  1497.     } 
  1498.       } 
  1499.     ;
  1500. #ifdef TRACE
  1501.       {
  1502.     (void) FPutC( '"' , logfile );
  1503.       } 
  1504.       {
  1505.     outtoken ( logfile ) ; 
  1506.       } 
  1507.       {
  1508.     (void) FPutC( '"' , logfile );
  1509.       } 
  1510.       {
  1511.     (void) FPrintF( logfile , "%s¥r",  " is a macro string" ) ; 
  1512.       } 
  1513. #endif /* TRACE */
  1514.       macrodefloc = strlookup ( buffer , bufptr1 , ( bufptr2 - bufptr1 ) , 0 , 
  1515.       true ) ; 
  1516.       fntype [ macrodefloc ] = 3 ; 
  1517.       ilkinfo [ macronameloc ] = hashtext [ macrodefloc ] ; 
  1518.       incr ( bufptr2 ) ; 
  1519.     } 
  1520.     {
  1521.       if ( ( ! eatbstwhitespace () ) ) 
  1522.       {
  1523.     eatbstprint () ; 
  1524.     {
  1525.       {
  1526.         (void) ReverseFPuts( logfile ,  "macro" ) ; 
  1527.         (void) FPrintFStdErr(  "macro" ) ; 
  1528.       } 
  1529.       {
  1530.         bsterrprintandlookfo () ; 
  1531.         goto lab10 ; 
  1532.       } 
  1533.     } 
  1534.       } 
  1535.     } 
  1536.     {
  1537.       if ( ( buffer [ bufptr2 ] != 125 ) ) 
  1538.       {
  1539.     bstrightbraceprint () ; 
  1540.     {
  1541.       {
  1542.         (void) ReverseFPuts( logfile ,  "macro" ) ; 
  1543.         (void) FPrintFStdErr(  "macro" ) ; 
  1544.       } 
  1545.       {
  1546.         bsterrprintandlookfo () ; 
  1547.         goto lab10 ; 
  1548.       } 
  1549.     } 
  1550.       } 
  1551.       incr ( bufptr2 ) ; 
  1552.     } 
  1553.   } 
  1554.   lab10: ; 
  1555. void getbibcommandorentry (void) {
  1556.     /* 22 26 15 10 */ atbibcommand = false ; 
  1557.   while ( ( ! scan1 ( 64 ) ) ) {
  1558.       
  1559.     if ( ( ! inputln ( bibfile [ bibptr ] ) ) ) 
  1560.     goto lab10 ; 
  1561.     incr ( biblinenum ) ; 
  1562.     bufptr2 = 0 ; 
  1563.   } 
  1564.   {
  1565.     if ( ( buffer [ bufptr2 ] != 64 ) ) 
  1566.     {
  1567.       {
  1568.     (void) FPrintF( logfile , "%s%c%s",  "An ¥"" , xchr [ 64 ] , "¥" disappeared" ) ; 
  1569.     (void) FPrintFStdErr( "%s%c%s",  "An ¥"" , xchr [ 64 ] , "¥" disappeared" ) ; 
  1570.       } 
  1571.       printconfusion () ; 
  1572.       longjmp(jmp9998,1) ; 
  1573.     } 
  1574.     incr ( bufptr2 ) ; 
  1575.     {
  1576.       if ( ( ! eatbibwhitespace () ) ) 
  1577.       {
  1578.     eatbibprint () ; 
  1579.     goto lab10 ; 
  1580.       } 
  1581.     } 
  1582.     scanidentifier ( 123 , 40 , 40 ) ; 
  1583.     {
  1584.       if ( ( ( scanresult == 3 ) || ( scanresult == 1 ) ) ) 
  1585.       ; 
  1586.       else {
  1587.       
  1588.     bibidprint () ; 
  1589.     {
  1590.       {
  1591.         (void) ReverseFPuts( logfile ,  "an entry type" ) ; 
  1592.         (void) FPrintFStdErr(  "an entry type" ) ; 
  1593.       } 
  1594.       biberrprint () ; 
  1595.       goto lab10 ; 
  1596.     } 
  1597.       } 
  1598.     } 
  1599.     ;
  1600. #ifdef TRACE
  1601.     {
  1602.       outtoken ( logfile ) ; 
  1603.     } 
  1604.     {
  1605.       (void) FPrintF( logfile , "%s¥r",  " is an entry type or a database-file command" ) ; 
  1606.     } 
  1607. #endif /* TRACE */
  1608.     lowercase ( buffer , bufptr1 , ( bufptr2 - bufptr1 ) ) ; 
  1609.     commandnum = ilkinfo [ strlookup ( buffer , bufptr1 , ( bufptr2 - bufptr1 
  1610.     ) , 12 , false ) ] ; 
  1611.     if ( ( hashfound ) ) 
  1612.     {
  1613.       atbibcommand = true ; 
  1614.       switch ( ( commandnum ) ) 
  1615.       {case 0 : 
  1616.     {
  1617.       goto lab10 ; 
  1618.     } 
  1619.     break ; 
  1620.       case 1 : 
  1621.     {
  1622.       if ( ( preambleptr == maxbibfiles ) ) 
  1623.       {
  1624.         {
  1625.           (void) FPrintF( logfile , "%s%ld%s",  "You've exceeded " , (long)maxbibfiles ,               " preamble commands" ) ; 
  1626.           (void) FPrintFStdErr( "%s%ld%s",  "You've exceeded " , (long)maxbibfiles ,               " preamble commands" ) ; 
  1627.         } 
  1628.         biberrprint () ; 
  1629.         goto lab10 ; 
  1630.       } 
  1631.       {
  1632.         if ( ( ! eatbibwhitespace () ) ) 
  1633.         {
  1634.           eatbibprint () ; 
  1635.           goto lab10 ; 
  1636.         } 
  1637.       } 
  1638.       if ( ( buffer [ bufptr2 ] == 123 ) ) 
  1639.       rightouterdelim = 125 ; 
  1640.       else if ( ( buffer [ bufptr2 ] == 40 ) ) 
  1641.       rightouterdelim = 41 ; 
  1642.       else {
  1643.           
  1644.         biboneoftwoprint ( 123 , 40 ) ; 
  1645.         goto lab10 ; 
  1646.       } 
  1647.       incr ( bufptr2 ) ; 
  1648.       {
  1649.         if ( ( ! eatbibwhitespace () ) ) 
  1650.         {
  1651.           eatbibprint () ; 
  1652.           goto lab10 ; 
  1653.         } 
  1654.       } 
  1655.       storefield = true ; 
  1656.       if ( ( ! scanandstorethefield () ) ) 
  1657.       goto lab10 ; 
  1658.       if ( ( buffer [ bufptr2 ] != rightouterdelim ) ) 
  1659.       {
  1660.         {
  1661.           (void) FPrintF( logfile , "%s%c%s",  "Missing ¥"" , xchr [ rightouterdelim ] ,               "¥" in preamble command" ) ; 
  1662.           (void) FPrintFStdErr( "%s%c%s",  "Missing ¥"" , xchr [ rightouterdelim ] ,               "¥" in preamble command" ) ; 
  1663.         } 
  1664.         biberrprint () ; 
  1665.         goto lab10 ; 
  1666.       } 
  1667.       incr ( bufptr2 ) ; 
  1668.       goto lab10 ; 
  1669.     } 
  1670.     break ; 
  1671.       case 2 : 
  1672.     {
  1673.       {
  1674.         if ( ( ! eatbibwhitespace () ) ) 
  1675.         {
  1676.           eatbibprint () ; 
  1677.           goto lab10 ; 
  1678.         } 
  1679.       } 
  1680.       {
  1681.         if ( ( buffer [ bufptr2 ] == 123 ) ) 
  1682.         rightouterdelim = 125 ; 
  1683.         else if ( ( buffer [ bufptr2 ] == 40 ) ) 
  1684.         rightouterdelim = 41 ; 
  1685.         else {
  1686.         
  1687.           biboneoftwoprint ( 123 , 40 ) ; 
  1688.           goto lab10 ; 
  1689.         } 
  1690.         incr ( bufptr2 ) ; 
  1691.         {
  1692.           if ( ( ! eatbibwhitespace () ) ) 
  1693.           {
  1694.         eatbibprint () ; 
  1695.         goto lab10 ; 
  1696.           } 
  1697.         } 
  1698.         scanidentifier ( 61 , 61 , 61 ) ; 
  1699.         {
  1700.           if ( ( ( scanresult == 3 ) || ( scanresult == 1 ) ) ) 
  1701.           ; 
  1702.           else {
  1703.           
  1704.         bibidprint () ; 
  1705.         {
  1706.           {
  1707.             (void) ReverseFPuts( logfile ,  "a string name" ) ; 
  1708.             (void) FPrintFStdErr(  "a string name" ) ; 
  1709.           } 
  1710.           biberrprint () ; 
  1711.           goto lab10 ; 
  1712.         } 
  1713.           } 
  1714.         } 
  1715.         {
  1716.     ;
  1717. #ifdef TRACE
  1718.           {
  1719.         outtoken ( logfile ) ; 
  1720.           } 
  1721.           {
  1722.         (void) FPrintF( logfile , "%s¥r",  " is a database-defined macro" ) ; 
  1723.           } 
  1724. #endif /* TRACE */
  1725.           lowercase ( buffer , bufptr1 , ( bufptr2 - bufptr1 ) ) ; 
  1726.           curmacroloc = strlookup ( buffer , bufptr1 , ( bufptr2 - bufptr1 
  1727.           ) , 13 , true ) ; 
  1728.           ilkinfo [ curmacroloc ] = hashtext [ curmacroloc ] ; 
  1729.         } 
  1730.       } 
  1731.       {
  1732.         if ( ( ! eatbibwhitespace () ) ) 
  1733.         {
  1734.           eatbibprint () ; 
  1735.           goto lab10 ; 
  1736.         } 
  1737.       } 
  1738.       {
  1739.         if ( ( buffer [ bufptr2 ] != 61 ) ) 
  1740.         {
  1741.           bibequalssignprint () ; 
  1742.           goto lab10 ; 
  1743.         } 
  1744.         incr ( bufptr2 ) ; 
  1745.         {
  1746.           if ( ( ! eatbibwhitespace () ) ) 
  1747.           {
  1748.         eatbibprint () ; 
  1749.         goto lab10 ; 
  1750.           } 
  1751.         } 
  1752.         storefield = true ; 
  1753.         if ( ( ! scanandstorethefield () ) ) 
  1754.         goto lab10 ; 
  1755.         if ( ( buffer [ bufptr2 ] != rightouterdelim ) ) 
  1756.         {
  1757.           {
  1758.         (void) FPrintF( logfile , "%s%c%s",  "Missing ¥"" , xchr [ rightouterdelim ] ,                 "¥" in string command" ) ; 
  1759.         (void) FPrintFStdErr( "%s%c%s",  "Missing ¥"" , xchr [ rightouterdelim ] ,                 "¥" in string command" ) ; 
  1760.           } 
  1761.           biberrprint () ; 
  1762.           goto lab10 ; 
  1763.         } 
  1764.         incr ( bufptr2 ) ; 
  1765.       } 
  1766.       goto lab10 ; 
  1767.     } 
  1768.     break ; 
  1769.     default: 
  1770.     bibcmdconfusion () ; 
  1771.     break ; 
  1772.       } 
  1773.     } 
  1774.     else {
  1775.     
  1776.       entrytypeloc = strlookup ( buffer , bufptr1 , ( bufptr2 - bufptr1 ) , 11 
  1777.       , false ) ; 
  1778.       if ( ( ( ! hashfound ) || ( fntype [ entrytypeloc ] != 1 ) ) ) 
  1779.       typeexists = false ; 
  1780.       else typeexists = true ; 
  1781.     } 
  1782.   } 
  1783.   {
  1784.     if ( ( ! eatbibwhitespace () ) ) 
  1785.     {
  1786.       eatbibprint () ; 
  1787.       goto lab10 ; 
  1788.     } 
  1789.   } 
  1790.   {
  1791.     if ( ( buffer [ bufptr2 ] == 123 ) ) 
  1792.     rightouterdelim = 125 ; 
  1793.     else if ( ( buffer [ bufptr2 ] == 40 ) ) 
  1794.     rightouterdelim = 41 ; 
  1795.     else {
  1796.     
  1797.       biboneoftwoprint ( 123 , 40 ) ; 
  1798.       goto lab10 ; 
  1799.     } 
  1800.     incr ( bufptr2 ) ; 
  1801.     {
  1802.       if ( ( ! eatbibwhitespace () ) ) 
  1803.       {
  1804.     eatbibprint () ; 
  1805.     goto lab10 ; 
  1806.       } 
  1807.     } 
  1808.     if ( ( rightouterdelim == 41 ) ) 
  1809.     {
  1810.       if ( ( scan1white ( 44 ) ) ) 
  1811.       ; 
  1812.     } 
  1813.     else if ( ( scan2white ( 44 , 125 ) ) ) 
  1814.     ; 
  1815.     {
  1816.     ;
  1817. #ifdef TRACE
  1818.       {
  1819.     outtoken ( logfile ) ; 
  1820.       } 
  1821.       {
  1822.     (void) FPrintF( logfile , "%s¥r",  " is a database key" ) ; 
  1823.       } 
  1824. #endif /* TRACE */
  1825.       tmpptr = bufptr1 ; 
  1826.       while ( ( tmpptr < bufptr2 ) ) {
  1827.       
  1828.     exbuf [ tmpptr ] = buffer [ tmpptr ] ; 
  1829.     incr ( tmpptr ) ; 
  1830.       } 
  1831.       lowercase ( exbuf , bufptr1 , ( bufptr2 - bufptr1 ) ) ; 
  1832.       if ( ( allentries ) ) 
  1833.       lcciteloc = strlookup ( exbuf , bufptr1 , ( bufptr2 - bufptr1 ) , 10 , 
  1834.       true ) ; 
  1835.       else lcciteloc = strlookup ( exbuf , bufptr1 , ( bufptr2 - bufptr1 ) , 
  1836.       10 , false ) ; 
  1837.       if ( ( hashfound ) ) 
  1838.       {
  1839.     entryciteptr = ilkinfo [ ilkinfo [ lcciteloc ] ] ; 
  1840.     {
  1841.       if ( ( ( ! allentries ) || ( entryciteptr < allmarker ) || ( 
  1842.       entryciteptr >= oldnumcites ) ) ) 
  1843.       {
  1844.         if ( ( typelist [ entryciteptr ] == 0 ) ) 
  1845.         {
  1846.           {
  1847.         if ( ( ( ! allentries ) && ( entryciteptr >= oldnumcites ) ) ) 
  1848.         {
  1849.           citeloc = strlookup ( buffer , bufptr1 , ( bufptr2 - bufptr1 
  1850.           ) , 9 , true ) ; 
  1851.           if ( ( ! hashfound ) ) 
  1852.           {
  1853.             ilkinfo [ lcciteloc ] = citeloc ; 
  1854.             ilkinfo [ citeloc ] = entryciteptr ; 
  1855.             citelist [ entryciteptr ] = hashtext [ citeloc ] ; 
  1856.             hashfound = true ; 
  1857.           } 
  1858.         } 
  1859.           } 
  1860.           goto lab26 ; 
  1861.         } 
  1862.       } 
  1863.       else if ( ( ! entryexists [ entryciteptr ] ) ) 
  1864.       {
  1865.         {
  1866.           exbufptr = 0 ; 
  1867.           tmpptr = strstart [ citeinfo [ entryciteptr ] ] ; 
  1868.           tmpendptr = strstart [ citeinfo [ entryciteptr ] + 1 ] ; 
  1869.           while ( ( tmpptr < tmpendptr ) ) {
  1870.           
  1871.         exbuf [ exbufptr ] = strpool [ tmpptr ] ; 
  1872.         incr ( exbufptr ) ; 
  1873.         incr ( tmpptr ) ; 
  1874.           } 
  1875.           lowercase ( exbuf , 0 , ( strstart [ citeinfo [ entryciteptr ] + 
  1876.           1 ] - strstart [ citeinfo [ entryciteptr ] ] ) ) ; 
  1877.           lcxciteloc = strlookup ( exbuf , 0 , ( strstart [ citeinfo [ 
  1878.           entryciteptr ] + 1 ] - strstart [ citeinfo [ entryciteptr ] ] ) 
  1879.           , 10 , false ) ; 
  1880.           if ( ( ! hashfound ) ) 
  1881.           citekeydisappearedco () ; 
  1882.         } 
  1883.         if ( ( lcxciteloc == lcciteloc ) ) 
  1884.         goto lab26 ; 
  1885.       } 
  1886.       if ( ( typelist [ entryciteptr ] == 0 ) ) 
  1887.       {
  1888.         {
  1889.           (void) ReverseFPuts( logfile ,  "The cite list is messed up" ) ; 
  1890.           (void) FPrintFStdErr(  "The cite list is messed up" ) ; 
  1891.         } 
  1892.         printconfusion () ; 
  1893.         longjmp(jmp9998,1) ; 
  1894.       } 
  1895.       {
  1896.         {
  1897.           (void) ReverseFPuts( logfile ,  "Repeated entry" ) ; 
  1898.           (void) FPrintFStdErr(  "Repeated entry" ) ; 
  1899.         } 
  1900.         biberrprint () ; 
  1901.         goto lab10 ; 
  1902.       } 
  1903.       lab26: ; 
  1904.     } 
  1905.       } 
  1906.       storeentry = true ; 
  1907.       if ( ( allentries ) ) 
  1908.       {
  1909.     if ( ( hashfound ) ) 
  1910.     {
  1911.       if ( ( entryciteptr < allmarker ) ) 
  1912.       goto lab22 ; 
  1913.       else {
  1914.           
  1915.         entryexists [ entryciteptr ] = true ; 
  1916.         citeloc = ilkinfo [ lcciteloc ] ; 
  1917.       } 
  1918.     } 
  1919.     else {
  1920.         
  1921.       citeloc = strlookup ( buffer , bufptr1 , ( bufptr2 - bufptr1 ) , 9 , 
  1922.       true ) ; 
  1923.       if ( ( hashfound ) ) 
  1924.       hashciteconfusion () ; 
  1925.     } 
  1926.     entryciteptr = citeptr ; 
  1927.     adddatabasecite ( citeptr ) ; 
  1928.     lab22: ; 
  1929.       } 
  1930.       else if ( ( ! hashfound ) ) 
  1931.       storeentry = false ; 
  1932.       if ( ( storeentry ) ) 
  1933.       {
  1934.     if ( ( typeexists ) ) 
  1935.     typelist [ entryciteptr ] = entrytypeloc ; 
  1936.     else {
  1937.         
  1938.       typelist [ entryciteptr ] = hashsize+1 ; 
  1939.       {
  1940.         (void) ReverseFPuts( logfile ,  "Warning--entry type for ¥"" ) ; 
  1941.         (void) FPrintFStdErr(  "Warning--entry type for ¥"" ) ; 
  1942.       } 
  1943.       printatoken () ; 
  1944.       {
  1945.         {
  1946.           (void) FPrintF( logfile , "%s¥r",  "¥" isn't style-file defined" ) ; 
  1947.           (void) FPrintFStdErr( "%s¥r",  "¥" isn't style-file defined" ) ; 
  1948.         } 
  1949.         bibwarnprint () ; 
  1950.       } 
  1951.     } 
  1952.       } 
  1953.     } 
  1954.   } 
  1955.   {
  1956.     if ( ( ! eatbibwhitespace () ) ) 
  1957.     {
  1958.       eatbibprint () ; 
  1959.       goto lab10 ; 
  1960.     } 
  1961.   } 
  1962.   {
  1963.     while ( ( buffer [ bufptr2 ] != rightouterdelim ) ) {
  1964.     
  1965.       if ( ( buffer [ bufptr2 ] != 44 ) ) 
  1966.       {
  1967.     biboneoftwoprint ( 44 , rightouterdelim ) ; 
  1968.     goto lab10 ; 
  1969.       } 
  1970.       incr ( bufptr2 ) ; 
  1971.       {
  1972.     if ( ( ! eatbibwhitespace () ) ) 
  1973.     {
  1974.       eatbibprint () ; 
  1975.       goto lab10 ; 
  1976.     } 
  1977.       } 
  1978.       if ( ( buffer [ bufptr2 ] == rightouterdelim ) ) 
  1979.       goto lab15 ; 
  1980.       {
  1981.     scanidentifier ( 61 , 61 , 61 ) ; 
  1982.     {
  1983.       if ( ( ( scanresult == 3 ) || ( scanresult == 1 ) ) ) 
  1984.       ; 
  1985.       else {
  1986.           
  1987.         bibidprint () ; 
  1988.         {
  1989.           {
  1990.         (void) ReverseFPuts( logfile ,  "a field name" ) ; 
  1991.         (void) FPrintFStdErr(  "a field name" ) ; 
  1992.           } 
  1993.           biberrprint () ; 
  1994.           goto lab10 ; 
  1995.         } 
  1996.       } 
  1997.     } 
  1998.     ;
  1999. #ifdef TRACE
  2000.     {
  2001.       outtoken ( logfile ) ; 
  2002.     } 
  2003.     {
  2004.       (void) FPrintF( logfile , "%s¥r",  " is a field name" ) ; 
  2005.     } 
  2006. #endif /* TRACE */
  2007.     storefield = false ; 
  2008.     if ( ( storeentry ) ) 
  2009.     {
  2010.       lowercase ( buffer , bufptr1 , ( bufptr2 - bufptr1 ) ) ; 
  2011.       fieldnameloc = strlookup ( buffer , bufptr1 , ( bufptr2 - bufptr1 ) 
  2012.       , 11 , false ) ; 
  2013.       if ( ( hashfound ) ) 
  2014.       if ( ( fntype [ fieldnameloc ] == 4 ) ) 
  2015.       storefield = true ; 
  2016.     } 
  2017.     {
  2018.       if ( ( ! eatbibwhitespace () ) ) 
  2019.       {
  2020.         eatbibprint () ; 
  2021.         goto lab10 ; 
  2022.       } 
  2023.     } 
  2024.     if ( ( buffer [ bufptr2 ] != 61 ) ) 
  2025.     {
  2026.       bibequalssignprint () ; 
  2027.       goto lab10 ; 
  2028.     } 
  2029.     incr ( bufptr2 ) ; 
  2030.       } 
  2031.       {
  2032.     if ( ( ! eatbibwhitespace () ) ) 
  2033.     {
  2034.       eatbibprint () ; 
  2035.       goto lab10 ; 
  2036.     } 
  2037.       } 
  2038.       if ( ( ! scanandstorethefield () ) ) 
  2039.       goto lab10 ; 
  2040.     } 
  2041.     lab15: incr ( bufptr2 ) ; 
  2042.   } 
  2043.   lab10: ; 
  2044. void bstreadcommand (void) {
  2045.     /* 10 */ if ( ( readseen ) ) 
  2046.   {
  2047.     {
  2048.       (void) ReverseFPuts( logfile ,  "Illegal, another read command" ) ; 
  2049.       (void) FPrintFStdErr(  "Illegal, another read command" ) ; 
  2050.     } 
  2051.     {
  2052.       bsterrprintandlookfo () ; 
  2053.       goto lab10 ; 
  2054.     } 
  2055.   } 
  2056.   readseen = true ; 
  2057.   if ( ( ! entryseen ) ) 
  2058.   {
  2059.     {
  2060.       (void) ReverseFPuts( logfile ,  "Illegal, read command before entry command" ) ; 
  2061.       (void) FPrintFStdErr(  "Illegal, read command before entry command" ) ; 
  2062.     } 
  2063.     {
  2064.       bsterrprintandlookfo () ; 
  2065.       goto lab10 ; 
  2066.     } 
  2067.   } 
  2068.   svptr1 = bufptr2 ; 
  2069.   svptr2 = last ; 
  2070.   tmpptr = svptr1 ; 
  2071.   while ( ( tmpptr < svptr2 ) ) {
  2072.       
  2073.     svbuffer [ tmpptr ] = buffer [ tmpptr ] ; 
  2074.     incr ( tmpptr ) ; 
  2075.   } 
  2076.   {
  2077.     {
  2078.       {
  2079.     checkfieldoverflow ( numfields * numcites ) ; 
  2080.     fieldptr = 0 ; 
  2081.     while ( ( fieldptr < maxfields ) ) {
  2082.         
  2083.       fieldinfo [ fieldptr ] = 0 ; 
  2084.       incr ( fieldptr ) ; 
  2085.     } 
  2086.       } 
  2087.       {
  2088.     citeptr = 0 ; 
  2089.     while ( ( citeptr < maxcites ) ) {
  2090.         
  2091.       typelist [ citeptr ] = 0 ; 
  2092.       citeinfo [ citeptr ] = 0 ; 
  2093.       incr ( citeptr ) ; 
  2094.     } 
  2095.     oldnumcites = numcites ; 
  2096.     if ( ( allentries ) ) 
  2097.     {
  2098.       citeptr = allmarker ; 
  2099.       while ( ( citeptr < oldnumcites ) ) {
  2100.           
  2101.         citeinfo [ citeptr ] = citelist [ citeptr ] ; 
  2102.         entryexists [ citeptr ] = false ; 
  2103.         incr ( citeptr ) ; 
  2104.       } 
  2105.       citeptr = allmarker ; 
  2106.     } 
  2107.     else {
  2108.         
  2109.       citeptr = numcites ; 
  2110.       allmarker = 0 ; 
  2111.     } 
  2112.       } 
  2113.     } 
  2114.     readperformed = true ; 
  2115.     bibptr = 0 ; 
  2116.     while ( ( bibptr < numbibfiles ) ) {
  2117.     
  2118.       {
  2119.     (void) FPrintF( logfile , "%s%ld%s",  "Database file #" , (long)bibptr + 1 , ": " ) ; 
  2120.     (void) FPrintFStdErr( "%s%ld%s",  "Database file #" , (long)bibptr + 1 , ": " ) ; 
  2121.       } 
  2122.       printbibname () ; 
  2123.       biblinenum = 0 ; 
  2124.       bufptr2 = last ; 
  2125.       while ( ( ! eof ( bibfile [ bibptr ] ) ) ) getbibcommandorentry () ; 
  2126.       aclose ( bibfile [ bibptr ] ) ; 
  2127.       incr ( bibptr ) ; 
  2128.     } 
  2129.     readingcompleted = true ; 
  2130.     ;
  2131. #ifdef TRACE
  2132.     {
  2133.       (void) FPrintF( logfile , "%s¥r",  "Finished reading the database file(s)" ) ; 
  2134.     } 
  2135. #endif /* TRACE */
  2136.     {
  2137.       numcites = citeptr ; 
  2138.       numpreamblestrings = preambleptr ; 
  2139.       {
  2140.     citeptr = 0 ; 
  2141.     while ( ( citeptr < numcites ) ) {
  2142.         
  2143.       fieldptr = citeptr * numfields + crossrefnum ; 
  2144.       if ( ( fieldinfo [ fieldptr ] != 0 ) ) 
  2145.       if ( ( findcitelocsforthisc ( fieldinfo [ fieldptr ] ) ) ) 
  2146.       {
  2147.         citeloc = ilkinfo [ lcciteloc ] ; 
  2148.         fieldinfo [ fieldptr ] = hashtext [ citeloc ] ; 
  2149.         citeparentptr = ilkinfo [ citeloc ] ; 
  2150.         fieldptr = citeptr * numfields + numpredefinedfields ; 
  2151.         fieldendptr = fieldptr - numpredefinedfields + numfields ; 
  2152.         fieldparentptr = citeparentptr * numfields + numpredefinedfields ; 
  2153.         while ( ( fieldptr < fieldendptr ) ) {
  2154.         
  2155.           if ( ( fieldinfo [ fieldptr ] == 0 ) ) 
  2156.           fieldinfo [ fieldptr ] = fieldinfo [ fieldparentptr ] ; 
  2157.           incr ( fieldptr ) ; 
  2158.           incr ( fieldparentptr ) ; 
  2159.         } 
  2160.       } 
  2161.       incr ( citeptr ) ; 
  2162.     } 
  2163.       } 
  2164.       {
  2165.     citeptr = 0 ; 
  2166.     while ( ( citeptr < numcites ) ) {
  2167.         
  2168.       fieldptr = citeptr * numfields + crossrefnum ; 
  2169.       if ( ( fieldinfo [ fieldptr ] != 0 ) ) 
  2170.       if ( ( ! findcitelocsforthisc ( fieldinfo [ fieldptr ] ) ) ) 
  2171.       {
  2172.         if ( ( citehashfound ) ) 
  2173.         hashciteconfusion () ; 
  2174.         nonexistentcrossrefe () ; 
  2175.         fieldinfo [ fieldptr ] = 0 ; 
  2176.       } 
  2177.       else {
  2178.           
  2179.         if ( ( citeloc != ilkinfo [ lcciteloc ] ) ) 
  2180.         hashciteconfusion () ; 
  2181.         citeparentptr = ilkinfo [ citeloc ] ; 
  2182.         if ( ( typelist [ citeparentptr ] == 0 ) ) 
  2183.         {
  2184.           nonexistentcrossrefe () ; 
  2185.           fieldinfo [ fieldptr ] = 0 ; 
  2186.         } 
  2187.         else {
  2188.         
  2189.           fieldparentptr = citeparentptr * numfields + crossrefnum ; 
  2190.           if ( ( fieldinfo [ fieldparentptr ] != 0 ) ) 
  2191.           {
  2192.         {
  2193.           (void) ReverseFPuts( logfile ,  "Warning--you've nested cross references"                   ) ; 
  2194.           (void) FPrintFStdErr(  "Warning--you've nested cross references" ) 
  2195.           ; 
  2196.         } 
  2197.         badcrossreferencepri ( citelist [ citeparentptr ] ) ; 
  2198.         {
  2199.           (void) FPrintF( logfile , "%s%ld¥r",  "¥", (long)which also refers to something" ) ; 
  2200.           (void) FPrintFStdErr( "%s%ld¥r",  "¥", (long)which also refers to something" ) ; 
  2201.         } 
  2202.         markwarning () ; 
  2203.           } 
  2204.           if ( ( ( ! allentries ) && ( citeparentptr >= oldnumcites ) && ( 
  2205.           citeinfo [ citeparentptr ] < mincrossrefs ) ) ) 
  2206.           fieldinfo [ fieldptr ] = 0 ; 
  2207.         } 
  2208.       } 
  2209.       incr ( citeptr ) ; 
  2210.     } 
  2211.       } 
  2212.       {
  2213.     citeptr = 0 ; 
  2214.     while ( ( citeptr < numcites ) ) {
  2215.         
  2216.       if ( ( typelist [ citeptr ] == 0 ) ) 
  2217.       printmissingentry ( citelist [ citeptr ] ) ; 
  2218.       else if ( ( ( allentries ) || ( citeptr < oldnumcites ) || ( 
  2219.       citeinfo [ citeptr ] >= mincrossrefs ) ) ) 
  2220.       {
  2221.         if ( ( citeptr > citexptr ) ) 
  2222.         {
  2223.           citelist [ citexptr ] = citelist [ citeptr ] ; 
  2224.           typelist [ citexptr ] = typelist [ citeptr ] ; 
  2225.           if ( ( ! findcitelocsforthisc ( citelist [ citeptr ] ) ) ) 
  2226.           citekeydisappearedco () ; 
  2227.           if ( ( ( ! citehashfound ) || ( citeloc != ilkinfo [ lcciteloc ] 
  2228.           ) ) ) 
  2229.           hashciteconfusion () ; 
  2230.           ilkinfo [ citeloc ] = citexptr ; 
  2231.           fieldptr = citexptr * numfields ; 
  2232.           fieldendptr = fieldptr + numfields ; 
  2233.           tmpptr = citeptr * numfields ; 
  2234.           while ( ( fieldptr < fieldendptr ) ) {
  2235.           
  2236.         fieldinfo [ fieldptr ] = fieldinfo [ tmpptr ] ; 
  2237.         incr ( fieldptr ) ; 
  2238.         incr ( tmpptr ) ; 
  2239.           } 
  2240.         } 
  2241.         incr ( citexptr ) ; 
  2242.       } 
  2243.       incr ( citeptr ) ; 
  2244.     } 
  2245.     numcites = citexptr ; 
  2246.     if ( ( allentries ) ) 
  2247.     {
  2248.       citeptr = allmarker ; 
  2249.       while ( ( citeptr < oldnumcites ) ) {
  2250.           
  2251.         if ( ( ! entryexists [ citeptr ] ) ) 
  2252.         printmissingentry ( citeinfo [ citeptr ] ) ; 
  2253.         incr ( citeptr ) ; 
  2254.       } 
  2255.     } 
  2256.       } 
  2257.       {
  2258.     if ( ( numentints * numcites > maxentints ) ) 
  2259.     {
  2260.       {
  2261.         (void) FPrintF( logfile , "%ld%s",  (long)numentints * numcites , ": " ) ; 
  2262.         (void) FPrintFStdErr( "%ld%s",  (long)numentints * numcites , ": " ) ; 
  2263.       } 
  2264.       {
  2265.         printoverflow () ; 
  2266.         {
  2267.           (void) FPrintF( logfile , "%s%ld¥r",  "total number of integer entry-variables " ,               (long)maxentints ) ; 
  2268.           (void) FPrintFStdErr( "%s%ld¥r",  "total number of integer entry-variables " ,               (long)maxentints ) ; 
  2269.         } 
  2270.         longjmp(jmp9998,1) ; 
  2271.       } 
  2272.     } 
  2273.     intentptr = 0 ; 
  2274.     while ( ( intentptr < numentints * numcites ) ) {
  2275.         
  2276.       entryints [ intentptr ] = 0 ; 
  2277.       incr ( intentptr ) ; 
  2278.     } 
  2279.       } 
  2280.       {
  2281.     if ( ( numentstrs * numcites > maxentstrs ) ) 
  2282.     {
  2283.       {
  2284.         (void) FPrintF( logfile , "%ld%s",  (long)numentstrs * numcites , ": " ) ; 
  2285.         (void) FPrintFStdErr( "%ld%s",  (long)numentstrs * numcites , ": " ) ; 
  2286.       } 
  2287.       {
  2288.         printoverflow () ; 
  2289.         {
  2290.           (void) FPrintF( logfile , "%s%ld¥r",  "total number of string entry-variables " ,               (long)maxentstrs ) ; 
  2291.           (void) FPrintFStdErr( "%s%ld¥r",  "total number of string entry-variables " ,               (long)maxentstrs ) ; 
  2292.         } 
  2293.         longjmp(jmp9998,1) ; 
  2294.       } 
  2295.     } 
  2296.     strentptr = 0 ; 
  2297.     while ( ( strentptr < numentstrs * numcites ) ) {
  2298.         
  2299.       entrystrs [ strentptr ] [ 0 ] = 127 ; 
  2300.       incr ( strentptr ) ; 
  2301.     } 
  2302.       } 
  2303.       {
  2304.     citeptr = 0 ; 
  2305.     while ( ( citeptr < numcites ) ) {
  2306.         
  2307.       citeinfo [ citeptr ] = citeptr ; 
  2308.       incr ( citeptr ) ; 
  2309.     } 
  2310.       } 
  2311.     } 
  2312.     readcompleted = true ; 
  2313.   } 
  2314.   bufptr2 = svptr1 ; 
  2315.   last = svptr2 ; 
  2316.   tmpptr = bufptr2 ; 
  2317.   while ( ( tmpptr < last ) ) {
  2318.       
  2319.     buffer [ tmpptr ] = svbuffer [ tmpptr ] ; 
  2320.     incr ( tmpptr ) ; 
  2321.   } 
  2322.   lab10: ; 
  2323. void bstreversecommand (void) {
  2324.     /* 10 */ if ( ( ! readseen ) ) 
  2325.   {
  2326.     {
  2327.       (void) ReverseFPuts( logfile ,  "Illegal, reverse command before read command" ) ; 
  2328.       (void) FPrintFStdErr(  "Illegal, reverse command before read command" ) ; 
  2329.     } 
  2330.     {
  2331.       bsterrprintandlookfo () ; 
  2332.       goto lab10 ; 
  2333.     } 
  2334.   } 
  2335.   {
  2336.     if ( ( ! eatbstwhitespace () ) ) 
  2337.     {
  2338.       eatbstprint () ; 
  2339.       {
  2340.     {
  2341.       (void) ReverseFPuts( logfile ,  "reverse" ) ; 
  2342.       (void) FPrintFStdErr(  "reverse" ) ; 
  2343.     } 
  2344.     {
  2345.       bsterrprintandlookfo () ; 
  2346.       goto lab10 ; 
  2347.     } 
  2348.       } 
  2349.     } 
  2350.   } 
  2351.   {
  2352.     if ( ( buffer [ bufptr2 ] != 123 ) ) 
  2353.     {
  2354.       bstleftbraceprint () ; 
  2355.       {
  2356.     {
  2357.       (void) ReverseFPuts( logfile ,  "reverse" ) ; 
  2358.       (void) FPrintFStdErr(  "reverse" ) ; 
  2359.     } 
  2360.     {
  2361.       bsterrprintandlookfo () ; 
  2362.       goto lab10 ; 
  2363.     } 
  2364.       } 
  2365.     } 
  2366.     incr ( bufptr2 ) ; 
  2367.   } 
  2368.   {
  2369.     if ( ( ! eatbstwhitespace () ) ) 
  2370.     {
  2371.       eatbstprint () ; 
  2372.       {
  2373.     {
  2374.       (void) ReverseFPuts( logfile ,  "reverse" ) ; 
  2375.       (void) FPrintFStdErr(  "reverse" ) ; 
  2376.     } 
  2377.     {
  2378.       bsterrprintandlookfo () ; 
  2379.       goto lab10 ; 
  2380.     } 
  2381.       } 
  2382.     } 
  2383.   } 
  2384.   {
  2385.     scanidentifier ( 125 , 37 , 37 ) ; 
  2386.     if ( ( ( scanresult == 3 ) || ( scanresult == 1 ) ) ) 
  2387.     ; 
  2388.     else {
  2389.     
  2390.       bstidprint () ; 
  2391.       {
  2392.     {
  2393.       (void) ReverseFPuts( logfile ,  "reverse" ) ; 
  2394.       (void) FPrintFStdErr(  "reverse" ) ; 
  2395.     } 
  2396.     {
  2397.       bsterrprintandlookfo () ; 
  2398.       goto lab10 ; 
  2399.     } 
  2400.       } 
  2401.     } 
  2402.   } 
  2403.   {
  2404.     ;
  2405. #ifdef TRACE
  2406.     {
  2407.       outtoken ( logfile ) ; 
  2408.     } 
  2409.     {
  2410.       (void) FPrintF( logfile , "%s¥r",  " is a to be iterated in reverse function" ) ; 
  2411.     } 
  2412. #endif /* TRACE */
  2413.     if ( ( badargumenttoken () ) ) 
  2414.     goto lab10 ; 
  2415.   } 
  2416.   {
  2417.     if ( ( ! eatbstwhitespace () ) ) 
  2418.     {
  2419.       eatbstprint () ; 
  2420.       {
  2421.     {
  2422.       (void) ReverseFPuts( logfile ,  "reverse" ) ; 
  2423.       (void) FPrintFStdErr(  "reverse" ) ; 
  2424.     } 
  2425.     {
  2426.       bsterrprintandlookfo () ; 
  2427.       goto lab10 ; 
  2428.     } 
  2429.       } 
  2430.     } 
  2431.   } 
  2432.   {
  2433.     if ( ( buffer [ bufptr2 ] != 125 ) ) 
  2434.     {
  2435.       bstrightbraceprint () ; 
  2436.       {
  2437.     {
  2438.       (void) ReverseFPuts( logfile ,  "reverse" ) ; 
  2439.       (void) FPrintFStdErr(  "reverse" ) ; 
  2440.     } 
  2441.     {
  2442.       bsterrprintandlookfo () ; 
  2443.       goto lab10 ; 
  2444.     } 
  2445.       } 
  2446.     } 
  2447.     incr ( bufptr2 ) ; 
  2448.   } 
  2449.   {
  2450.     initcommandexecution () ; 
  2451.     messwithentries = true ; 
  2452.     if ( ( numcites > 0 ) ) 
  2453.     {
  2454.       sortciteptr = numcites ; 
  2455.       do {
  2456.       decr ( sortciteptr ) ; 
  2457.     citeptr = citeinfo [ sortciteptr ] ; 
  2458.     ;
  2459. #ifdef TRACE
  2460.     {
  2461.       outpoolstr ( logfile , hashtext [ fnloc ] ) ; 
  2462.     } 
  2463.     {
  2464.       (void) ReverseFPuts( logfile ,  " to be iterated in reverse on " ) ; 
  2465.     } 
  2466.     {
  2467.       outpoolstr ( logfile , citelist [ citeptr ] ) ; 
  2468.     } 
  2469.     {
  2470.       (void) FPutC('¥r', logfile );
  2471.     } 
  2472. #endif /* TRACE */
  2473.     executefn ( fnloc ) ; 
  2474.     checkcommandexecutio () ; 
  2475.       } while ( ! ( ( sortciteptr == 0 ) ) ) ; 
  2476.     } 
  2477.   } 
  2478.   lab10: ; 
  2479. void bstsortcommand (void) {
  2480.     /* 10 */ if ( ( ! readseen ) ) 
  2481.   {
  2482.     {
  2483.       (void) ReverseFPuts( logfile ,  "Illegal, sort command before read command" ) ; 
  2484.       (void) FPrintFStdErr(  "Illegal, sort command before read command" ) ; 
  2485.     } 
  2486.     {
  2487.       bsterrprintandlookfo () ; 
  2488.       goto lab10 ; 
  2489.     } 
  2490.   } 
  2491.   {
  2492.     ;
  2493. #ifdef TRACE
  2494.     {
  2495.       (void) FPrintF( logfile , "%s¥r",  "Sorting the entries" ) ; 
  2496.     } 
  2497. #endif /* TRACE */
  2498.     if ( ( numcites > 1 ) ) 
  2499.     quicksort ( 0 , numcites - 1 ) ; 
  2500.     ;
  2501. #ifdef TRACE
  2502.     {
  2503.       (void) FPrintF( logfile , "%s¥r",  "Done sorting" ) ; 
  2504.     } 
  2505. #endif /* TRACE */
  2506.   } 
  2507.   lab10: ; 
  2508. void bststringscommand (void) {
  2509.     /* 10 */ { 
  2510.     if ( ( ! eatbstwhitespace () ) ) 
  2511.     {
  2512.       eatbstprint () ; 
  2513.       {
  2514.     {
  2515.       (void) ReverseFPuts( logfile ,  "strings" ) ; 
  2516.       (void) FPrintFStdErr(  "strings" ) ; 
  2517.     } 
  2518.     {
  2519.       bsterrprintandlookfo () ; 
  2520.       goto lab10 ; 
  2521.     } 
  2522.       } 
  2523.     } 
  2524.   } 
  2525.   {
  2526.     if ( ( buffer [ bufptr2 ] != 123 ) ) 
  2527.     {
  2528.       bstleftbraceprint () ; 
  2529.       {
  2530.     {
  2531.       (void) ReverseFPuts( logfile ,  "strings" ) ; 
  2532.       (void) FPrintFStdErr(  "strings" ) ; 
  2533.     } 
  2534.     {
  2535.       bsterrprintandlookfo () ; 
  2536.       goto lab10 ; 
  2537.     } 
  2538.       } 
  2539.     } 
  2540.     incr ( bufptr2 ) ; 
  2541.   } 
  2542.   {
  2543.     if ( ( ! eatbstwhitespace () ) ) 
  2544.     {
  2545.       eatbstprint () ; 
  2546.       {
  2547.     {
  2548.       (void) ReverseFPuts( logfile ,  "strings" ) ; 
  2549.       (void) FPrintFStdErr(  "strings" ) ; 
  2550.     } 
  2551.     {
  2552.       bsterrprintandlookfo () ; 
  2553.       goto lab10 ; 
  2554.     } 
  2555.       } 
  2556.     } 
  2557.   } 
  2558.   while ( ( buffer [ bufptr2 ] != 125 ) ) {
  2559.       
  2560.     {
  2561.       scanidentifier ( 125 , 37 , 37 ) ; 
  2562.       if ( ( ( scanresult == 3 ) || ( scanresult == 1 ) ) ) 
  2563.       ; 
  2564.       else {
  2565.       
  2566.     bstidprint () ; 
  2567.     {
  2568.       {
  2569.         (void) ReverseFPuts( logfile ,  "strings" ) ; 
  2570.         (void) FPrintFStdErr(  "strings" ) ; 
  2571.       } 
  2572.       {
  2573.         bsterrprintandlookfo () ; 
  2574.         goto lab10 ; 
  2575.       } 
  2576.     } 
  2577.       } 
  2578.     } 
  2579.     {
  2580.     ;
  2581. #ifdef TRACE
  2582.       {
  2583.     outtoken ( logfile ) ; 
  2584.       } 
  2585.       {
  2586.     (void) FPrintF( logfile , "%s¥r",  " is a string global-variable" ) ; 
  2587.       } 
  2588. #endif /* TRACE */
  2589.       lowercase ( buffer , bufptr1 , ( bufptr2 - bufptr1 ) ) ; 
  2590.       fnloc = strlookup ( buffer , bufptr1 , ( bufptr2 - bufptr1 ) , 11 , true 
  2591.       ) ; 
  2592.       {
  2593.     if ( ( hashfound ) ) 
  2594.     {
  2595.       alreadyseenfunctionp ( fnloc ) ; 
  2596.       goto lab10 ; 
  2597.     } 
  2598.       } 
  2599.       fntype [ fnloc ] = 8 ; 
  2600.       ilkinfo [ fnloc ] = numglbstrs ; 
  2601.       if ( ( numglbstrs == 10 ) ) 
  2602.       {
  2603.     printoverflow () ; 
  2604.     {
  2605.       (void) FPrintF( logfile , "%s%ld¥r",  "number of string global-variables " , (long)10 ) ; 
  2606.       (void) FPrintFStdErr( "%s%ld¥r",  "number of string global-variables " , (long)10 ) ; 
  2607.     } 
  2608.     longjmp(jmp9998,1) ; 
  2609.       } 
  2610.       incr ( numglbstrs ) ; 
  2611.     } 
  2612.     {
  2613.       if ( ( ! eatbstwhitespace () ) ) 
  2614.       {
  2615.     eatbstprint () ; 
  2616.     {
  2617.       {
  2618.         (void) ReverseFPuts( logfile ,  "strings" ) ; 
  2619.         (void) FPrintFStdErr(  "strings" ) ; 
  2620.       } 
  2621.       {
  2622.         bsterrprintandlookfo () ; 
  2623.         goto lab10 ; 
  2624.       } 
  2625.     } 
  2626.       } 
  2627.     } 
  2628.   } 
  2629.   incr ( bufptr2 ) ; 
  2630.   lab10: ; 
  2631. void getbstcommandandproc (void) {
  2632.     /* 10 */ if ( ( ! scanalpha () ) ) 
  2633.   {
  2634.     {
  2635.       (void) FPrintF( logfile , "%c%c%s",  '"' , xchr [ buffer [ bufptr2 ] ] ,       "¥" can't start a style-file command" ) ; 
  2636.       (void) FPrintFStdErr( "%c%c%s",  '"' , xchr [ buffer [ bufptr2 ] ] ,       "¥" can't start a style-file command" ) ; 
  2637.     } 
  2638.     {
  2639.       bsterrprintandlookfo () ; 
  2640.       goto lab10 ; 
  2641.     } 
  2642.   } 
  2643.   lowercase ( buffer , bufptr1 , ( bufptr2 - bufptr1 ) ) ; 
  2644.   commandnum = ilkinfo [ strlookup ( buffer , bufptr1 , ( bufptr2 - bufptr1 ) 
  2645.   , 4 , false ) ] ; 
  2646.   if ( ( ! hashfound ) ) 
  2647.   {
  2648.     printatoken () ; 
  2649.     {
  2650.       {
  2651.     (void) ReverseFPuts( logfile ,  " is an illegal style-file command" ) ; 
  2652.     (void) FPrintFStdErr(  " is an illegal style-file command" ) ; 
  2653.       } 
  2654.       {
  2655.     bsterrprintandlookfo () ; 
  2656.     goto lab10 ; 
  2657.       } 
  2658.     } 
  2659.   } 
  2660.   switch ( ( commandnum ) ) 
  2661.   {case 0 : 
  2662.     bstentrycommand () ; 
  2663.     break ; 
  2664.   case 1 : 
  2665.     bstexecutecommand () ; 
  2666.     break ; 
  2667.   case 2 : 
  2668.     bstfunctioncommand () ; 
  2669.     break ; 
  2670.   case 3 : 
  2671.     bstintegerscommand () ; 
  2672.     break ; 
  2673.   case 4 : 
  2674.     bstiteratecommand () ; 
  2675.     break ; 
  2676.   case 5 : 
  2677.     bstmacrocommand () ; 
  2678.     break ; 
  2679.   case 6 : 
  2680.     bstreadcommand () ; 
  2681.     break ; 
  2682.   case 7 : 
  2683.     bstreversecommand () ; 
  2684.     break ; 
  2685.   case 8 : 
  2686.     bstsortcommand () ; 
  2687.     break ; 
  2688.   case 9 : 
  2689.     bststringscommand () ; 
  2690.     break ; 
  2691.     default: 
  2692.     {
  2693.       {
  2694.     (void) ReverseFPuts( logfile ,  "Unknown style-file command" ) ; 
  2695.     (void) FPrintFStdErr(  "Unknown style-file command" ) ; 
  2696.       } 
  2697.       printconfusion () ; 
  2698.       longjmp(jmp9998,1) ; 
  2699.     } 
  2700.     break ; 
  2701.   } 
  2702.   lab10: ; 
  2703.  
  2704. static void deinitialize(void);
  2705. static void vincerealloc(void);
  2706.  
  2707.   // Added by Vince so we can re-run without quitting 
  2708.  
  2709. void initialize (void) {
  2710.     /* 
  2711.      * Changed the following from
  2712.      * #def's to const's
  2713.      */
  2714.     
  2715.     if (theAppPointer->mBigBibTeX) {    
  2716.         hashsize = 6000;
  2717.         bufsize = 3000;
  2718.         minprintline = 3;
  2719.         maxprintline = 79;
  2720.         maxbibfiles = 20;
  2721.         poolsize = 65530L;
  2722.         maxstrings = 6000;
  2723.         maxcites = 750;
  2724.         mincrossrefs = 2;
  2725.         wizfnspace = 3000;
  2726.         maxentints = 3000;
  2727.         maxentstrs = 3000;
  2728.         maxfields = 17250;
  2729.     } else {
  2730.         hashsize = 5000;
  2731.         bufsize = 3000;
  2732.         minprintline = 3;
  2733.         maxprintline = 79;
  2734.         maxbibfiles = 20;
  2735.         poolsize = 65530L;
  2736.         maxstrings = 4000;
  2737.         maxcites = 750;
  2738.         mincrossrefs = 2;
  2739.         wizfnspace = 3000;
  2740.         maxentints = 3000;
  2741.         maxentstrs = 3000;
  2742.         maxfields = 17250;
  2743.     }
  2744.             
  2745.     
  2746.     deinitialize();
  2747.     
  2748.     schar i  ; 
  2749.   hashloc k  ;
  2750.   
  2751.   /* Allocation has been changed by Vince */
  2752.   
  2753. #define ALLOC(t,p,c) {                                                        ¥
  2754.         p = (t) chkalloc( (long) ((long)sizeof(*(p)) * ((long)c)), (long)1);        ¥
  2755.         if ( p==0) { SysBeep(5); exit(0); };                                ¥
  2756. }
  2757.   
  2758.   ALLOC(poolpointer*, strstart,maxstrings + 1)  ; 
  2759.   ALLOC( strnumber*, biblist,maxbibfiles + 1)  ; 
  2760.   ALLOC( alphafile*, bibfile,maxbibfiles + 1)  ; 
  2761.   ALLOC( hashptr2*, typelist,maxcites + 1)  ; 
  2762.   ALLOC( boolean*, entryexists,maxcites + 1)  ; 
  2763.   ALLOC( strnumber*, spreamble,maxbibfiles + 1)  ; 
  2764.   ALLOC(char*, strpool, poolsize+1);
  2765.   ALLOC(short*, hashnext, hashsize+1);
  2766.   ALLOC(long*, hashtext, hashsize+1);
  2767.   ALLOC(char*, hashilk, hashsize+1);
  2768.   ALLOC(long*, ilkinfo,hashsize+1);
  2769.   ALLOC(char*, fntype, hashsize+1);
  2770.   ALLOC(short*, wizfunctions, wizfnspace + 1);
  2771.   ALLOC(long*, entryints, maxentints+1);
  2772.   ALLOC(char(*)[101], entrystrs, maxentstrs+1);
  2773.   ALLOC(char(*)[1001], globalstrs, 10); 
  2774.   ALLOC(long*, fieldinfo, maxfields + 1); 
  2775.   ALLOC(long*, citeinfo, maxcites + 1); 
  2776.   ALLOC(char*, buffer, bufsize + 1);
  2777.   ALLOC(char*, svbuffer, bufsize + 1);
  2778.   ALLOC(char*, exbuf, bufsize + 1);
  2779.   ALLOC(char*, outbuf, bufsize + 1);
  2780.   ALLOC(long*, nametok, bufsize + 1); 
  2781.   ALLOC(char*, namesepchar, bufsize + 1); 
  2782.   ALLOC(long*, citelist, maxcites + 1); 
  2783.   
  2784.   /* end of Vince's alterations */
  2785.   
  2786.   bad = 0 ; 
  2787.   if ( ( minprintline < 3 ) ) 
  2788.   bad = 1 ; 
  2789.   if ( ( maxprintline <= minprintline ) ) 
  2790.   bad = 10 * bad + 2 ; 
  2791.   if ( ( maxprintline >= bufsize ) ) 
  2792.   bad = 10 * bad + 3 ; 
  2793.   if ( ( 4253 < 128 ) ) 
  2794.   bad = 10 * bad + 4 ; 
  2795.   if ( ( 4253 > hashsize ) ) 
  2796.   bad = 10 * bad + 5 ; 
  2797.   if ( ( 4253 >= ( 16320 ) ) ) 
  2798.   bad = 10 * bad + 6 ; 
  2799.   if ( ( maxstrings > hashsize ) ) 
  2800.   bad = 10 * bad + 7 ; 
  2801.   if ( ( maxcites > maxstrings ) ) 
  2802.   bad = 10 * bad + 8 ; 
  2803.   if ( ( entstrsize > bufsize ) ) 
  2804.   bad = 10 * bad + 9 ; 
  2805.   if ( ( globstrsize > bufsize ) ) 
  2806.   bad = 100 * bad + 11 ; 
  2807.   if ( ( 10 < 2 * 4 + 2 ) ) 
  2808.   bad = 100 * bad + 22 ; 
  2809.   if ( ( bad > 0 ) ) 
  2810.   {
  2811.     (void) FPrintFStdErr( "%ld%s¥r",  (long)bad , " is a bad bad" ) ; 
  2812.     uexit ( 0 ) ; 
  2813.   } 
  2814.   history = 0 ; 
  2815.   xchr [ 32 ] = ' ' ; 
  2816.   xchr [ 33 ] = '!' ; 
  2817.   xchr [ 34 ] = '"' ; 
  2818.   xchr [ 35 ] = '#' ; 
  2819.   xchr [ 36 ] = '$' ; 
  2820.   xchr [ 37 ] = '%' ; 
  2821.   xchr [ 38 ] = '&' ; 
  2822.   xchr [ 39 ] = '¥'' ; 
  2823.   xchr [ 40 ] = '(' ; 
  2824.   xchr [ 41 ] = ')' ; 
  2825.   xchr [ 42 ] = '*' ; 
  2826.   xchr [ 43 ] = '+' ; 
  2827.   xchr [ 44 ] = ',' ; 
  2828.   xchr [ 45 ] = '-' ; 
  2829.   xchr [ 46 ] = '.' ; 
  2830.   xchr [ 47 ] = '/' ; 
  2831.   xchr [ 48 ] = '0' ; 
  2832.   xchr [ 49 ] = '1' ; 
  2833.   xchr [ 50 ] = '2' ; 
  2834.   xchr [ 51 ] = '3' ; 
  2835.   xchr [ 52 ] = '4' ; 
  2836.   xchr [ 53 ] = '5' ; 
  2837.   xchr [ 54 ] = '6' ; 
  2838.   xchr [ 55 ] = '7' ; 
  2839.   xchr [ 56 ] = '8' ; 
  2840.   xchr [ 57 ] = '9' ; 
  2841.   xchr [ 58 ] = ':' ; 
  2842.   xchr [ 59 ] = ';' ; 
  2843.   xchr [ 60 ] = '<' ; 
  2844.   xchr [ 61 ] = '=' ; 
  2845.   xchr [ 62 ] = '>' ; 
  2846.   xchr [ 63 ] = '?' ; 
  2847.   xchr [ 64 ] = '@' ; 
  2848.   xchr [ 65 ] = 'A' ; 
  2849.   xchr [ 66 ] = 'B' ; 
  2850.   xchr [ 67 ] = 'C' ; 
  2851.   xchr [ 68 ] = 'D' ; 
  2852.   xchr [ 69 ] = 'E' ; 
  2853.   xchr [ 70 ] = 'F' ; 
  2854.   xchr [ 71 ] = 'G' ; 
  2855.   xchr [ 72 ] = 'H' ; 
  2856.   xchr [ 73 ] = 'I' ; 
  2857.   xchr [ 74 ] = 'J' ; 
  2858.   xchr [ 75 ] = 'K' ; 
  2859.   xchr [ 76 ] = 'L' ; 
  2860.   xchr [ 77 ] = 'M' ; 
  2861.   xchr [ 78 ] = 'N' ; 
  2862.   xchr [ 79 ] = 'O' ; 
  2863.   xchr [ 80 ] = 'P' ; 
  2864.   xchr [ 81 ] = 'Q' ; 
  2865.   xchr [ 82 ] = 'R' ; 
  2866.   xchr [ 83 ] = 'S' ; 
  2867.   xchr [ 84 ] = 'T' ; 
  2868.   xchr [ 85 ] = 'U' ; 
  2869.   xchr [ 86 ] = 'V' ; 
  2870.   xchr [ 87 ] = 'W' ; 
  2871.   xchr [ 88 ] = 'X' ; 
  2872.   xchr [ 89 ] = 'Y' ; 
  2873.   xchr [ 90 ] = 'Z' ; 
  2874.   xchr [ 91 ] = '[' ; 
  2875.   xchr [ 92 ] = '¥¥' ; 
  2876.   xchr [ 93 ] = ']' ; 
  2877.   xchr [ 94 ] = '^' ; 
  2878.   xchr [ 95 ] = '_' ; 
  2879.   xchr [ 96 ] = '`' ; 
  2880.   xchr [ 97 ] = 'a' ; 
  2881.   xchr [ 98 ] = 'b' ; 
  2882.   xchr [ 99 ] = 'c' ; 
  2883.   xchr [ 100 ] = 'd' ; 
  2884.   xchr [ 101 ] = 'e' ; 
  2885.   xchr [ 102 ] = 'f' ; 
  2886.   xchr [ 103 ] = 'g' ; 
  2887.   xchr [ 104 ] = 'h' ; 
  2888.   xchr [ 105 ] = 'i' ; 
  2889.   xchr [ 106 ] = 'j' ; 
  2890.   xchr [ 107 ] = 'k' ; 
  2891.   xchr [ 108 ] = 'l' ; 
  2892.   xchr [ 109 ] = 'm' ; 
  2893.   xchr [ 110 ] = 'n' ; 
  2894.   xchr [ 111 ] = 'o' ; 
  2895.   xchr [ 112 ] = 'p' ; 
  2896.   xchr [ 113 ] = 'q' ; 
  2897.   xchr [ 114 ] = 'r' ; 
  2898.   xchr [ 115 ] = 's' ; 
  2899.   xchr [ 116 ] = 't' ; 
  2900.   xchr [ 117 ] = 'u' ; 
  2901.   xchr [ 118 ] = 'v' ; 
  2902.   xchr [ 119 ] = 'w' ; 
  2903.   xchr [ 120 ] = 'x' ; 
  2904.   xchr [ 121 ] = 'y' ; 
  2905.   xchr [ 122 ] = 'z' ; 
  2906.   xchr [ 123 ] = '{' ; 
  2907.   xchr [ 124 ] = '|' ; 
  2908.   xchr [ 125 ] = '}' ; 
  2909.   xchr [ 126 ] = '~' ; 
  2910.   xchr [ 0 ] = ' ' ; 
  2911.   xchr [ 127 ] = ' ' ; 
  2912.   /* Added by Vince to cope with chars 128-255 for DirectTeX */
  2913.   for(register int xc =128;xc<218;xc++){ xchr[xc] = (unsigned char) xc;} 
  2914.   /* chars 217 onwards are not used, I'm told */
  2915.   for(register int xc2 =218;xc2<256;xc2++){ xchr[xc2] = ' ';} 
  2916.   {register integer for_end; i = 1 ; for_end = 31 ; if ( i <= for_end) do 
  2917.     xchr [ i ] = ' ' ; 
  2918.   while ( i++ < for_end ) ; } 
  2919.   xchr [ 9 ] = chr ( 9 ) ; 
  2920.   {register integer for_end; i = 0 ; for_end = 127 ; if ( i <= for_end) do 
  2921.     xord [ chr ( i ) ] = 127 ; 
  2922.   while ( i++ < for_end ) ; } 
  2923.   {register integer for_end; i = 1 ; for_end = 126 ; if ( i <= for_end) do 
  2924.     xord [ xchr [ i ] ] = i ; 
  2925.   while ( i++ < for_end ) ; } 
  2926.   {register integer for_end; i = 0 ; for_end = 127 ; if ( i <= for_end) do 
  2927.     lexclass [ i ] = 5 ; 
  2928.   while ( i++ < for_end ) ; } 
  2929.   {register integer for_end; i = 0 ; for_end = 31 ; if ( i <= for_end) do 
  2930.     lexclass [ i ] = 0 ; 
  2931.   while ( i++ < for_end ) ; } 
  2932.   lexclass [ 127 ] = 0 ; 
  2933.   lexclass [ 9 ] = 1 ; 
  2934.   lexclass [ 32 ] = 1 ; 
  2935.   lexclass [ 126 ] = 4 ; 
  2936.   lexclass [ 45 ] = 4 ; 
  2937.   {register integer for_end; i = 48 ; for_end = 57 ; if ( i <= for_end) do 
  2938.     lexclass [ i ] = 3 ; 
  2939.   while ( i++ < for_end ) ; } 
  2940.   {register integer for_end; i = 65 ; for_end = 90 ; if ( i <= for_end) do 
  2941.     lexclass [ i ] = 2 ; 
  2942.   while ( i++ < for_end ) ; } 
  2943.   {register integer for_end; i = 97 ; for_end = 122 ; if ( i <= for_end) do 
  2944.     lexclass [ i ] = 2 ; 
  2945.   while ( i++ < for_end ) ; } 
  2946.   {register integer for_end; i = 0 ; for_end = 127 ; if ( i <= for_end) do 
  2947.     idclass [ i ] = 1 ; 
  2948.   while ( i++ < for_end ) ; } 
  2949.   {register integer for_end; i = 0 ; for_end = 31 ; if ( i <= for_end) do 
  2950.     idclass [ i ] = 0 ; 
  2951.   while ( i++ < for_end ) ; } 
  2952.   idclass [ 32 ] = 0 ; 
  2953.   idclass [ 9 ] = 0 ; 
  2954.   idclass [ 34 ] = 0 ; 
  2955.   idclass [ 35 ] = 0 ; 
  2956.   idclass [ 37 ] = 0 ; 
  2957.   idclass [ 39 ] = 0 ; 
  2958.   idclass [ 40 ] = 0 ; 
  2959.   idclass [ 41 ] = 0 ; 
  2960.   idclass [ 44 ] = 0 ; 
  2961.   idclass [ 61 ] = 0 ; 
  2962.   idclass [ 123 ] = 0 ; 
  2963.   idclass [ 125 ] = 0 ; 
  2964.   {register integer for_end; i = 0 ; for_end = 127 ; if ( i <= for_end) do 
  2965.     charwidth [ i ] = 0 ; 
  2966.   while ( i++ < for_end ) ; } 
  2967.   charwidth [ 32 ] = 278 ; 
  2968.   charwidth [ 33 ] = 278 ; 
  2969.   charwidth [ 34 ] = 500 ; 
  2970.   charwidth [ 35 ] = 833 ; 
  2971.   charwidth [ 36 ] = 500 ; 
  2972.   charwidth [ 37 ] = 833 ; 
  2973.   charwidth [ 38 ] = 778 ; 
  2974.   charwidth [ 39 ] = 278 ; 
  2975.   charwidth [ 40 ] = 389 ; 
  2976.   charwidth [ 41 ] = 389 ; 
  2977.   charwidth [ 42 ] = 500 ; 
  2978.   charwidth [ 43 ] = 778 ; 
  2979.   charwidth [ 44 ] = 278 ; 
  2980.   charwidth [ 45 ] = 333 ; 
  2981.   charwidth [ 46 ] = 278 ; 
  2982.   charwidth [ 47 ] = 500 ; 
  2983.   charwidth [ 48 ] = 500 ; 
  2984.   charwidth [ 49 ] = 500 ; 
  2985.   charwidth [ 50 ] = 500 ; 
  2986.   charwidth [ 51 ] = 500 ; 
  2987.   charwidth [ 52 ] = 500 ; 
  2988.   charwidth [ 53 ] = 500 ; 
  2989.   charwidth [ 54 ] = 500 ; 
  2990.   charwidth [ 55 ] = 500 ; 
  2991.   charwidth [ 56 ] = 500 ; 
  2992.   charwidth [ 57 ] = 500 ; 
  2993.   charwidth [ 58 ] = 278 ; 
  2994.   charwidth [ 59 ] = 278 ; 
  2995.   charwidth [ 60 ] = 278 ; 
  2996.   charwidth [ 61 ] = 778 ; 
  2997.   charwidth [ 62 ] = 472 ; 
  2998.   charwidth [ 63 ] = 472 ; 
  2999.   charwidth [ 64 ] = 778 ; 
  3000.   charwidth [ 65 ] = 750 ; 
  3001.   charwidth [ 66 ] = 708 ; 
  3002.   charwidth [ 67 ] = 722 ; 
  3003.   charwidth [ 68 ] = 764 ; 
  3004.   charwidth [ 69 ] = 681 ; 
  3005.   charwidth [ 70 ] = 653 ; 
  3006.   charwidth [ 71 ] = 785 ; 
  3007.   charwidth [ 72 ] = 750 ; 
  3008.   charwidth [ 73 ] = 361 ; 
  3009.   charwidth [ 74 ] = 514 ; 
  3010.   charwidth [ 75 ] = 778 ; 
  3011.   charwidth [ 76 ] = 625 ; 
  3012.   charwidth [ 77 ] = 917 ; 
  3013.   charwidth [ 78 ] = 750 ; 
  3014.   charwidth [ 79 ] = 778 ; 
  3015.   charwidth [ 80 ] = 681 ; 
  3016.   charwidth [ 81 ] = 778 ; 
  3017.   charwidth [ 82 ] = 736 ; 
  3018.   charwidth [ 83 ] = 556 ; 
  3019.   charwidth [ 84 ] = 722 ; 
  3020.   charwidth [ 85 ] = 750 ; 
  3021.   charwidth [ 86 ] = 750 ; 
  3022.   charwidth [ 87 ] = 1028 ; 
  3023.   charwidth [ 88 ] = 750 ; 
  3024.   charwidth [ 89 ] = 750 ; 
  3025.   charwidth [ 90 ] = 611 ; 
  3026.   charwidth [ 91 ] = 278 ; 
  3027.   charwidth [ 92 ] = 500 ; 
  3028.   charwidth [ 93 ] = 278 ; 
  3029.   charwidth [ 94 ] = 500 ; 
  3030.   charwidth [ 95 ] = 278 ; 
  3031.   charwidth [ 96 ] = 278 ; 
  3032.   charwidth [ 97 ] = 500 ; 
  3033.   charwidth [ 98 ] = 556 ; 
  3034.   charwidth [ 99 ] = 444 ; 
  3035.   charwidth [ 100 ] = 556 ; 
  3036.   charwidth [ 101 ] = 444 ; 
  3037.   charwidth [ 102 ] = 306 ; 
  3038.   charwidth [ 103 ] = 500 ; 
  3039.   charwidth [ 104 ] = 556 ; 
  3040.   charwidth [ 105 ] = 278 ; 
  3041.   charwidth [ 106 ] = 306 ; 
  3042.   charwidth [ 107 ] = 528 ; 
  3043.   charwidth [ 108 ] = 278 ; 
  3044.   charwidth [ 109 ] = 833 ; 
  3045.   charwidth [ 110 ] = 556 ; 
  3046.   charwidth [ 111 ] = 500 ; 
  3047.   charwidth [ 112 ] = 556 ; 
  3048.   charwidth [ 113 ] = 528 ; 
  3049.   charwidth [ 114 ] = 392 ; 
  3050.   charwidth [ 115 ] = 394 ; 
  3051.   charwidth [ 116 ] = 389 ; 
  3052.   charwidth [ 117 ] = 556 ; 
  3053.   charwidth [ 118 ] = 528 ; 
  3054.   charwidth [ 119 ] = 722 ; 
  3055.   charwidth [ 120 ] = 528 ; 
  3056.   charwidth [ 121 ] = 528 ; 
  3057.   charwidth [ 122 ] = 444 ; 
  3058.   charwidth [ 123 ] = 500 ; 
  3059.   charwidth [ 124 ] = 1000 ; 
  3060.   charwidth [ 125 ] = 500 ; 
  3061.   charwidth [ 126 ] = 500 ; 
  3062.   {register integer for_end; k = 1 ; for_end = hashsize ; if ( k <= for_end) do 
  3063.     {
  3064.       hashnext [ k ] = 0 ; 
  3065.       hashtext [ k ] = 0 ; 
  3066.     } 
  3067.   while ( k++ < for_end ) ; } 
  3068.   hashused = hashsize+1 ; 
  3069.   poolptr = 0 ; 
  3070.   strptr = 1 ; 
  3071.   strstart [ strptr ] = poolptr ; 
  3072.   bibptr = 0 ; 
  3073.   bibseen = false ; 
  3074.   bststr = 0 ; 
  3075.   bstseen = false ; 
  3076.   citeptr = 0 ; 
  3077.   citationseen = false ; 
  3078.   allentries = false ; 
  3079.   wizdefptr = 0 ; 
  3080.   numentints = 0 ; 
  3081.   numentstrs = 0 ; 
  3082.   numfields = 0 ; 
  3083.   strglbptr = 0 ; 
  3084.   while ( ( strglbptr < 10 ) ) {
  3085.       
  3086.     glbstrptr [ strglbptr ] = 0 ; 
  3087.     glbstrend [ strglbptr ] = 0 ; 
  3088.     incr ( strglbptr ) ; 
  3089.   } 
  3090.   numglbstrs = 0 ; 
  3091.   entryseen = false ; 
  3092.   readseen = false ; 
  3093.   readperformed = false ; 
  3094.   readingcompleted = false ; 
  3095.   readcompleted = false ; 
  3096.   implfnnum = 0 ; 
  3097.   outbuflength = 0 ; 
  3098.   predefcertainstrings () ; 
  3099.   getthetoplevelauxfil () ; 
  3100.   
  3101.  
  3102. static void deinitialize(void) {
  3103.     // added these which seem to be important
  3104.     citeptr = 0;
  3105.     // this next one here caused me big problems
  3106.     // it is probably indicative of a subtle bug in
  3107.     // the old mac BibTeX that it was never zeroed.
  3108.     citexptr = 0;
  3109.     numcites = 0;
  3110.     oldnumcites = 0;
  3111.     strpool = 0;
  3112.      hashnext = 0;
  3113.     hashtext = 0;
  3114.     hashilk = 0;
  3115.     ilkinfo = 0;
  3116.     fntype = 0;
  3117.      wizfunctions = 0;
  3118.     entryints = 0;
  3119.     entrystrs = 0;
  3120.     globalstrs = 0;
  3121.     fieldinfo = 0;
  3122.     citeinfo = 0;
  3123.     buffer = 0;
  3124.     svbuffer = 0;
  3125.     exbuf = 0;
  3126.     outbuf = 0;
  3127.     nametok = 0;
  3128.     namesepchar = 0;
  3129.     citelist = 0;
  3130.   lab31 = 0;
  3131.   for(short i=0;i<=auxstacksize;i++) {
  3132.       auxfile[i] = 0;
  3133.       auxlnstack[i] = 0;
  3134.   }
  3135.   auxptr = 0;
  3136.   bbllinenum = biblinenum = bstlinenum = 0;
  3137.   bufptr2 = 0;
  3138.   errcount = 0;
  3139.   last = 0;
  3140.   for(short i=0;i<70;i++) {
  3141.       jmp32[i] = jmp9998[i] = 0;
  3142.   }
  3143.   
  3144. }
  3145.  
  3146. #ifdef GIVE_UP_TIME
  3147. static void give_up_some_time(void);
  3148.  
  3149. void give_up_some_time(void){
  3150.     cede_time();
  3151.     vincerealloc();
  3152. }
  3153. #endif
  3154.  
  3155. void vincerealloc(void){
  3156.     // reset to the beginning
  3157.     ptohrealloc(1);
  3158.     
  3159. #undef ALLOC
  3160. #define ALLOC(t,p,c) p = (t) ptohrealloc(0);
  3161.   
  3162.   ALLOC(poolpointer*, strstart,maxstrings + 1)  ; 
  3163.   ALLOC( strnumber*, biblist,maxbibfiles + 1)  ; 
  3164.   ALLOC( alphafile*, bibfile,maxbibfiles + 1)  ; 
  3165.   ALLOC( hashptr2*, typelist,maxcites + 1)  ; 
  3166.   ALLOC( boolean*, entryexists,maxcites + 1)  ; 
  3167.   ALLOC( strnumber*, spreamble,maxbibfiles + 1)  ; 
  3168.   ALLOC(char*, strpool, poolsize+1);
  3169.   ALLOC(short*, hashnext, hashsize+1);
  3170.   ALLOC(long*, hashtext, hashsize+1);
  3171.   ALLOC(char*, hashilk, hashsize+1);
  3172.   ALLOC(long*, ilkinfo,hashsize+1);
  3173.   ALLOC(char*, fntype, hashsize+1);
  3174.   ALLOC(short*, wizfunctions, wizfnspace + 1);
  3175.   ALLOC(long*, entryints, maxentints+1);
  3176.   ALLOC(char(*)[101], entrystrs, maxentstrs+1);
  3177.   ALLOC(char(*)[1001], globalstrs, 10); 
  3178.   ALLOC(long*, fieldinfo, maxfields + 1); 
  3179.   ALLOC(long*, citeinfo, maxcites + 1); 
  3180.   ALLOC(char*, buffer, bufsize + 1);
  3181.   ALLOC(char*, svbuffer, bufsize + 1);
  3182.   ALLOC(char*, exbuf, bufsize + 1);
  3183.   ALLOC(char*, outbuf, bufsize + 1);
  3184.   ALLOC(long*, nametok, bufsize + 1); 
  3185.   ALLOC(char*, namesepchar, bufsize + 1); 
  3186.   ALLOC(long*, citelist, maxcites + 1); 
  3187. }
  3188. void main_body(void) {
  3189.   initialize () ; 
  3190.  
  3191.     //extern alphafile logfile;
  3192.       //logfile = logfile;
  3193.       
  3194.     
  3195.   {
  3196.     (void) FPrintF( logfile , "%s¥r",  "This is BibTeX, C Version 0.99c" ) ; 
  3197.     (void) FPrintFStdErr( "%s¥r",  "This is BibTeX, C Version 0.99c" ) ; 
  3198.   } 
  3199.   {
  3200.     (void) ReverseFPuts( logfile ,  "The top-level auxiliary file: " ) ; 
  3201.     (void) FPrintFStdErr(  "The top-level auxiliary file: " ) ; 
  3202.   } 
  3203.   printauxname () ; 
  3204.   while ( lab31==0 ) {
  3205.       
  3206.     incr ( auxlnstack [ auxptr ] ) ; 
  3207.     if ( ( ! inputln ( auxfile [ auxptr ] ) ) ) 
  3208.     poptheauxstack () ; 
  3209.     else getauxcommandandproc () ; 
  3210.   } 
  3211. #ifdef TRACE
  3212.   {
  3213.     (void) FPrintF( logfile , "%s¥r",  "Finished reading the auxiliary file(s)" ) ; 
  3214.   } 
  3215. #endif /* TRACE */
  3216.    lastcheckforauxerror () ; 
  3217.   if ( ( bststr == 0 ) ) 
  3218.   goto lab9932 ; 
  3219.   bstlinenum = 0 ; 
  3220.   bbllinenum = 1 ; 
  3221.   bufptr2 = last ; 
  3222.   if(setjmp(jmp9998)==1) goto lab9998;if(setjmp(jmp32)==0)while(true) 
  3223.   {
  3224.     if ( ( ! eatbstwhitespace () ) ) 
  3225.     break ; 
  3226.     getbstcommandandproc () ; 
  3227.   } 
  3228.    aclose ( bstfile ) ; 
  3229.   lab9932: CloseOutputFile ( bblfile ) ; 
  3230.   lab9998: {
  3231.       
  3232.     if ( ( ( readperformed ) && ( ! readingcompleted ) ) ) 
  3233.     {
  3234.       {
  3235.     (void) FPrintF( logfile , "%s%ld%s",  "Aborted at line " , (long)biblinenum , " of file " ) ; 
  3236.     (void) FPrintFStdErr( "%s%ld%s",  "Aborted at line " , (long)biblinenum , " of file " ) ; 
  3237.       } 
  3238.       printbibname () ; 
  3239.     } 
  3240.     traceandstatprinting () ; 
  3241.     switch ( ( history ) ) 
  3242.     {case 0 : 
  3243.       ; 
  3244.       break ; 
  3245.     case 1 : 
  3246.       {
  3247.     if ( ( errcount == 1 ) ) 
  3248.     {
  3249.       (void) FPrintF( logfile , "%s¥r",  "(There was 1 warning)" ) ; 
  3250.       (void) FPrintFStdErr( "%s¥r",  "(There was 1 warning)" ) ; 
  3251.     } 
  3252.     else {
  3253.         
  3254.       (void) FPrintF( logfile , "%s%ld%s¥r",  "(There were " , (long)errcount , " warnings)" ) ; 
  3255.       (void) FPrintFStdErr( "%s%ld%s¥r",  "(There were " , (long)errcount , " warnings)" ) ; 
  3256.     } 
  3257.       } 
  3258.       break ; 
  3259.     case 2 : 
  3260.       {
  3261.     if ( ( errcount == 1 ) ) 
  3262.     {
  3263.       (void) FPrintF( logfile , "%s¥r",  "(There was 1 error message)" ) ; 
  3264.       (void) FPrintFStdErr( "%s¥r",  "(There was 1 error message)" ) ; 
  3265.     } 
  3266.     else {
  3267.         
  3268.       (void) FPrintF( logfile , "%s%ld%s¥r",  "(There were " , (long)errcount , " error messages)" ) 
  3269.       ; 
  3270.       (void) FPrintFStdErr( "%s%ld%s¥r",  "(There were " , (long)errcount , " error messages)" ) 
  3271.       ; 
  3272.     } 
  3273.       } 
  3274.       break ; 
  3275.     case 3 : 
  3276.       {
  3277.     (void) FPrintF( logfile , "%s¥r",  "(That was a fatal error)" ) ; 
  3278.     (void) FPrintFStdErr( "%s¥r",  "(That was a fatal error)" ) ; 
  3279.       } 
  3280.       break ; 
  3281.       default: 
  3282.       {
  3283.     {
  3284.       (void) ReverseFPuts( logfile ,  "History is bunk" ) ; 
  3285.       (void) FPrintFStdErr(  "History is bunk" ) ; 
  3286.     } 
  3287.     printconfusion () ; 
  3288.       } 
  3289.       break ; 
  3290.     } 
  3291.     CloseOutputFile ( logfile ) ; 
  3292.   } 
  3293.   lab9999: ; 
  3294.  
  3295. /* added by vince */
  3296. void CloseAllFilesAfterError(void){
  3297.     CloseOutputFile(logfile);
  3298.     CloseOutputFile(bblfile);
  3299.     aclose ( bstfile ) ; 
  3300.     while(auxptr>=0) {
  3301.         aclose ( auxfile [ auxptr ] ) ; 
  3302.         decr(auxptr);
  3303.     }
  3304.     bibptr = 0 ; 
  3305.     while ( ( bibptr < numbibfiles ) ) {
  3306.       aclose ( bibfile [ bibptr ] ) ; 
  3307.       incr ( bibptr ) ; 
  3308.     }     
  3309. }
  3310.  
  3311. #include "BibTeX.h"
  3312.  
  3313. #include "BibTeX.p"
  3314. #include "globals.h"
  3315. #include "coerce.h"
  3316.  
  3317. void
  3318. #ifdef STDC
  3319. zbuildin (pdstype pds ,pdslen len ,hashloc * fnhashloc ,bltinrange bltinnum ) 
  3320. #else
  3321. zbuildin ( pds , len , fnhashloc , bltinnum ) 
  3322. pdstype pds ; 
  3323. pdslen len ; 
  3324. hashloc * fnhashloc ; 
  3325. bltinrange bltinnum ; 
  3326. #endif
  3327. {predefine ( pds , len , 11 ) ; 
  3328. *  fnhashloc = predefloc ; 
  3329.   fntype [ *fnhashloc ] = 0 ; 
  3330.   ilkinfo [ *fnhashloc ] = bltinnum ; 
  3331.     ;
  3332. #ifdef STAT
  3333.   bltinloc [ bltinnum ] = *fnhashloc ; 
  3334.   executioncount [ bltinnum ] = 0 ; 
  3335. #endif /* STAT */
  3336. void predefcertainstrings (void) {
  3337.     predefine ( ".aux        " , 4 , 7 ) ;
  3338.   sauxextension = hashtext [ predefloc ] ; 
  3339.   predefine ( ".bbl        " , 4 , 7 ) ; 
  3340.   sbblextension = hashtext [ predefloc ] ; 
  3341.   predefine ( ".blg        " , 4 , 7 ) ; 
  3342.   slogextension = hashtext [ predefloc ] ; 
  3343.   predefine ( ".bst        " , 4 , 7 ) ; 
  3344.   sbstextension = hashtext [ predefloc ] ; 
  3345.   predefine ( ".bib        " , 4 , 7 ) ; 
  3346.   sbibextension = hashtext [ predefloc ] ; 
  3347.   predefine ( "texinputs:  " , 10 , 8 ) ; 
  3348.   sbstarea = hashtext [ predefloc ] ; 
  3349.   predefine ( "texbib:     " , 7 , 8 ) ; 
  3350.   sbibarea = hashtext [ predefloc ] ; 
  3351.   predefine ( "¥¥citation   " , 9 , 2 ) ; 
  3352.   ilkinfo [ predefloc ] = 2 ; 
  3353.   predefine ( "¥¥bibdata    " , 8 , 2 ) ; 
  3354.   ilkinfo [ predefloc ] = 0 ; 
  3355.   predefine ( "¥¥bibstyle   " , 9 , 2 ) ; 
  3356.   ilkinfo [ predefloc ] = 1 ; 
  3357.   predefine ( "¥¥@input     " , 7 , 2 ) ; 
  3358.   ilkinfo [ predefloc ] = 3 ; 
  3359.   predefine ( "entry       " , 5 , 4 ) ; 
  3360.   ilkinfo [ predefloc ] = 0 ; 
  3361.   predefine ( "execute     " , 7 , 4 ) ; 
  3362.   ilkinfo [ predefloc ] = 1 ; 
  3363.   predefine ( "function    " , 8 , 4 ) ; 
  3364.   ilkinfo [ predefloc ] = 2 ; 
  3365.   predefine ( "integers    " , 8 , 4 ) ; 
  3366.   ilkinfo [ predefloc ] = 3 ; 
  3367.   predefine ( "iterate     " , 7 , 4 ) ; 
  3368.   ilkinfo [ predefloc ] = 4 ; 
  3369.   predefine ( "macro       " , 5 , 4 ) ; 
  3370.   ilkinfo [ predefloc ] = 5 ; 
  3371.   predefine ( "read        " , 4 , 4 ) ; 
  3372.   ilkinfo [ predefloc ] = 6 ; 
  3373.   predefine ( "reverse     " , 7 , 4 ) ; 
  3374.   ilkinfo [ predefloc ] = 7 ; 
  3375.   predefine ( "sort        " , 4 , 4 ) ; 
  3376.   ilkinfo [ predefloc ] = 8 ; 
  3377.   predefine ( "strings     " , 7 , 4 ) ; 
  3378.   ilkinfo [ predefloc ] = 9 ; 
  3379.   predefine ( "comment     " , 7 , 12 ) ; 
  3380.   ilkinfo [ predefloc ] = 0 ; 
  3381.   predefine ( "preamble    " , 8 , 12 ) ; 
  3382.   ilkinfo [ predefloc ] = 1 ; 
  3383.   predefine ( "string      " , 6 , 12 ) ; 
  3384.   ilkinfo [ predefloc ] = 2 ; 
  3385.   buildin ( "=           " , 1 , bequals , 0 ) ; 
  3386.   buildin ( ">           " , 1 , bgreaterthan , 1 ) ; 
  3387.   buildin ( "<           " , 1 , blessthan , 2 ) ; 
  3388.   buildin ( "+           " , 1 , bplus , 3 ) ; 
  3389.   buildin ( "-           " , 1 , bminus , 4 ) ; 
  3390.   buildin ( "*           " , 1 , bconcatenate , 5 ) ; 
  3391.   buildin ( ":=          " , 2 , bgets , 6 ) ; 
  3392.   buildin ( "add.period$ " , 11 , baddperiod , 7 ) ; 
  3393.   buildin ( "call.type$  " , 10 , bcalltype , 8 ) ; 
  3394.   buildin ( "change.case$" , 12 , bchangecase , 9 ) ; 
  3395.   buildin ( "chr.to.int$ " , 11 , bchrtoint , 10 ) ; 
  3396.   buildin ( "cite$       " , 5 , bcite , 11 ) ; 
  3397.   buildin ( "duplicate$  " , 10 , bduplicate , 12 ) ; 
  3398.   buildin ( "empty$      " , 6 , bempty , 13 ) ; 
  3399.   buildin ( "format.name$" , 12 , bformatname , 14 ) ; 
  3400.   buildin ( "if$         " , 3 , bif , 15 ) ; 
  3401.   buildin ( "int.to.chr$ " , 11 , binttochr , 16 ) ; 
  3402.   buildin ( "int.to.str$ " , 11 , binttostr , 17 ) ; 
  3403.   buildin ( "missing$    " , 8 , bmissing , 18 ) ; 
  3404.   buildin ( "newline$    " , 8 , bnewline , 19 ) ; 
  3405.   buildin ( "num.names$  " , 10 , bnumnames , 20 ) ; 
  3406.   buildin ( "pop$        " , 4 , bpop , 21 ) ; 
  3407.   buildin ( "preamble$   " , 9 , bpreamble , 22 ) ; 
  3408.   buildin ( "purify$     " , 7 , bpurify , 23 ) ; 
  3409.   buildin ( "quote$      " , 6 , bquote , 24 ) ; 
  3410.   buildin ( "skip$       " , 5 , bskip , 25 ) ; 
  3411.   buildin ( "stack$      " , 6 , bstack , 26 ) ; 
  3412.   buildin ( "substring$  " , 10 , bsubstring , 27 ) ; 
  3413.   buildin ( "swap$       " , 5 , bswap , 28 ) ; 
  3414.   buildin ( "text.length$" , 12 , btextlength , 29 ) ; 
  3415.   buildin ( "text.prefix$" , 12 , btextprefix , 30 ) ; 
  3416.   buildin ( "top$        " , 4 , btopstack , 31 ) ; 
  3417.   buildin ( "type$       " , 5 , btype , 32 ) ; 
  3418.   buildin ( "warning$    " , 8 , bwarning , 33 ) ; 
  3419.   buildin ( "width$      " , 6 , bwidth , 35 ) ; 
  3420.   buildin ( "while$      " , 6 , bwhile , 34 ) ; 
  3421.   buildin ( "width$      " , 6 , bwidth , 35 ) ; 
  3422.   buildin ( "write$      " , 6 , bwrite , 36 ) ; 
  3423.   predefine ( "            " , 0 , 0 ) ; 
  3424.   snull = hashtext [ predefloc ] ; 
  3425.   fntype [ predefloc ] = 3 ; 
  3426.   predefine ( "default.type" , 12 , 0 ) ; 
  3427.   sdefault = hashtext [ predefloc ] ; 
  3428.   fntype [ predefloc ] = 3 ; 
  3429.   bdefault = bskip ; 
  3430.   preambleptr = 0 ; 
  3431.   predefine ( "i           " , 1 , 14 ) ; 
  3432.   ilkinfo [ predefloc ] = 0 ; 
  3433.   predefine ( "j           " , 1 , 14 ) ; 
  3434.   ilkinfo [ predefloc ] = 1 ; 
  3435.   predefine ( "oe          " , 2 , 14 ) ; 
  3436.   ilkinfo [ predefloc ] = 2 ; 
  3437.   predefine ( "OE          " , 2 , 14 ) ; 
  3438.   ilkinfo [ predefloc ] = 3 ; 
  3439.   predefine ( "ae          " , 2 , 14 ) ; 
  3440.   ilkinfo [ predefloc ] = 4 ; 
  3441.   predefine ( "AE          " , 2 , 14 ) ; 
  3442.   ilkinfo [ predefloc ] = 5 ; 
  3443.   predefine ( "aa          " , 2 , 14 ) ; 
  3444.   ilkinfo [ predefloc ] = 6 ; 
  3445.   predefine ( "AA          " , 2 , 14 ) ; 
  3446.   ilkinfo [ predefloc ] = 7 ; 
  3447.   predefine ( "o           " , 1 , 14 ) ; 
  3448.   ilkinfo [ predefloc ] = 8 ; 
  3449.   predefine ( "O           " , 1 , 14 ) ; 
  3450.   ilkinfo [ predefloc ] = 9 ; 
  3451.   predefine ( "l           " , 1 , 14 ) ; 
  3452.   ilkinfo [ predefloc ] = 10 ; 
  3453.   predefine ( "L           " , 1 , 14 ) ; 
  3454.   ilkinfo [ predefloc ] = 11 ; 
  3455.   predefine ( "ss          " , 2 , 14 ) ; 
  3456.   ilkinfo [ predefloc ] = 12 ; 
  3457.   predefine ( "crossref    " , 8 , 11 ) ; 
  3458.   fntype [ predefloc ] = 4 ; 
  3459.   ilkinfo [ predefloc ] = numfields ; 
  3460.   crossrefnum = numfields ; 
  3461.   incr ( numfields ) ; 
  3462.   numpredefinedfields = numfields ; 
  3463.   predefine ( "sort.key$   " , 9 , 11 ) ; 
  3464.   fntype [ predefloc ] = 6 ; 
  3465.   ilkinfo [ predefloc ] = numentstrs ; 
  3466.   sortkeynum = numentstrs ; 
  3467.   incr ( numentstrs ) ; 
  3468.   predefine ( "entry.max$  " , 10 , 11 ) ; 
  3469.   fntype [ predefloc ] = 7 ; 
  3470.   ilkinfo [ predefloc ] = entstrsize ; 
  3471.   predefine ( "global.max$ " , 11 , 11 ) ; 
  3472.   fntype [ predefloc ] = 7 ; 
  3473.   ilkinfo [ predefloc ] = globstrsize ; 
  3474. #ifdef STDC
  3475. boolean zscan1 (ASCIIcode char1 ) 
  3476. #else
  3477. boolean zscan1 ( char1 ) 
  3478. ASCIIcode char1 ; 
  3479. #endif
  3480. {register boolean Result; bufptr1 = bufptr2 ; 
  3481.   while ( ( ( buffer [ bufptr2 ] != char1 ) && ( bufptr2 < last ) ) ) incr ( 
  3482.   bufptr2 ) ; 
  3483.   if ( ( bufptr2 < last ) ) 
  3484.   Result = true ; 
  3485.   else Result = false ; 
  3486.   return(Result) ; 
  3487. #ifdef STDC
  3488. boolean zscan1white (ASCIIcode char1 ) 
  3489. #else
  3490. boolean zscan1white ( char1 ) 
  3491. ASCIIcode char1 ; 
  3492. #endif
  3493. {register boolean Result; bufptr1 = bufptr2 ; 
  3494.   while ( ( ( lexclass [ buffer [ bufptr2 ] ] != 1 ) && ( buffer [ bufptr2 ] 
  3495.   != char1 ) && ( bufptr2 < last ) ) ) incr ( bufptr2 ) ; 
  3496.   if ( ( bufptr2 < last ) ) 
  3497.   Result = true ; 
  3498.   else Result = false ; 
  3499.   return(Result) ; 
  3500. #ifdef STDC
  3501. boolean zscan2 (ASCIIcode char1 ,ASCIIcode char2 ) 
  3502. #else
  3503. boolean zscan2 ( char1 , char2 ) 
  3504. ASCIIcode char1 , char2 ; 
  3505. #endif
  3506. {register boolean Result; bufptr1 = bufptr2 ; 
  3507.   while ( ( ( buffer [ bufptr2 ] != char1 ) && ( buffer [ bufptr2 ] != char2 ) 
  3508.   && ( bufptr2 < last ) ) ) incr ( bufptr2 ) ; 
  3509.   if ( ( bufptr2 < last ) ) 
  3510.   Result = true ; 
  3511.   else Result = false ; 
  3512.   return(Result) ; 
  3513. #ifdef STDC
  3514. boolean zscan2white (ASCIIcode char1 ,ASCIIcode char2 ) 
  3515. #else
  3516. boolean zscan2white ( char1 , char2 ) 
  3517. ASCIIcode char1 , char2 ; 
  3518. #endif
  3519. {register boolean Result; bufptr1 = bufptr2 ; 
  3520.   while ( ( ( buffer [ bufptr2 ] != char1 ) && ( buffer [ bufptr2 ] != char2 ) 
  3521.   && ( lexclass [ buffer [ bufptr2 ] ] != 1 ) && ( bufptr2 < last ) ) ) incr ( 
  3522.   bufptr2 ) ; 
  3523.   if ( ( bufptr2 < last ) ) 
  3524.   Result = true ; 
  3525.   else Result = false ; 
  3526.   return(Result) ; 
  3527. }
  3528. #ifdef STDC
  3529. boolean zscan3 (ASCIIcode char1 ,ASCIIcode char2 ,ASCIIcode char3 ) 
  3530. #else
  3531. boolean zscan3 ( char1 , char2 , char3 ) 
  3532. ASCIIcode char1 , char2 , char3 ; 
  3533. #endif
  3534. {register boolean Result; bufptr1 = bufptr2 ; 
  3535.   while ( ( ( buffer [ bufptr2 ] != char1 ) && ( buffer [ bufptr2 ] != char2 ) 
  3536.   && ( buffer [ bufptr2 ] != char3 ) && ( bufptr2 < last ) ) ) incr ( bufptr2 
  3537.   ) ; 
  3538.   if ( ( bufptr2 < last ) ) 
  3539.   Result = true ; 
  3540.   else Result = false ; 
  3541.   return(Result) ; 
  3542. boolean scanalpha () {
  3543.     register boolean Result; bufptr1 = bufptr2 ; 
  3544.   while ( ( ( lexclass [ buffer [ bufptr2 ] ] == 2 ) && ( bufptr2 < last ) ) ) 
  3545.   incr ( bufptr2 ) ; 
  3546.   if ( ( ( bufptr2 - bufptr1 ) == 0 ) ) 
  3547.   Result = false ; 
  3548.   else Result = true ; 
  3549.   return(Result) ; 
  3550. void
  3551. #ifdef STDC
  3552. zscanidentifier (ASCIIcode char1 ,ASCIIcode char2 ,ASCIIcode char3 ) 
  3553. #else
  3554. zscanidentifier ( char1 , char2 , char3 ) 
  3555. ASCIIcode char1 , char2 , char3 ; 
  3556. #endif
  3557. {bufptr1 = bufptr2 ; 
  3558.   if ( ( lexclass [ buffer [ bufptr2 ] ] != 3 ) ) 
  3559.   while ( ( ( idclass [ buffer [ bufptr2 ] ] == 1 ) && ( bufptr2 < last ) ) ) 
  3560.   incr ( bufptr2 ) ; 
  3561.   if ( ( ( bufptr2 - bufptr1 ) == 0 ) ) 
  3562.   scanresult = 0 ; 
  3563.   else if ( ( ( lexclass [ buffer [ bufptr2 ] ] == 1 ) || ( bufptr2 == last ) 
  3564.   ) ) 
  3565.   scanresult = 3 ; 
  3566.   else if ( ( ( buffer [ bufptr2 ] == char1 ) || ( buffer [ bufptr2 ] == char2 
  3567.   ) || ( buffer [ bufptr2 ] == char3 ) ) ) 
  3568.   scanresult = 1 ; 
  3569.   else scanresult = 2 ; 
  3570. boolean scannonneginteger () {
  3571.     register boolean Result; bufptr1 = bufptr2 ; 
  3572.   tokenvalue = 0 ; 
  3573.   while ( ( ( lexclass [ buffer [ bufptr2 ] ] == 3 ) && ( bufptr2 < last ) ) ) 
  3574.   {
  3575.     tokenvalue = tokenvalue * 10 + ( buffer [ bufptr2 ] - 48 ) ; 
  3576.     incr ( bufptr2 ) ; 
  3577.   } 
  3578.   if ( ( ( bufptr2 - bufptr1 ) == 0 ) ) 
  3579.   Result = false ; 
  3580.   else Result = true ; 
  3581.   return(Result) ; 
  3582. boolean scaninteger () {
  3583.     register boolean Result; schar signlength  ; 
  3584.   bufptr1 = bufptr2 ; 
  3585.   if ( ( buffer [ bufptr2 ] == 45 ) ) 
  3586.   {
  3587.     signlength = 1 ; 
  3588.     incr ( bufptr2 ) ; 
  3589.   } 
  3590.   else signlength = 0 ; 
  3591.   tokenvalue = 0 ; 
  3592.   while ( ( ( lexclass [ buffer [ bufptr2 ] ] == 3 ) && ( bufptr2 < last ) ) ) 
  3593.   {
  3594.     tokenvalue = tokenvalue * 10 + ( buffer [ bufptr2 ] - 48 ) ; 
  3595.     incr ( bufptr2 ) ; 
  3596.   } 
  3597.   if ( ( ( signlength == 1 ) ) ) 
  3598.   tokenvalue = - (integer) tokenvalue ; 
  3599.   if ( ( ( bufptr2 - bufptr1 ) == signlength ) ) 
  3600.   Result = false ; 
  3601.   else Result = true ; 
  3602.   return(Result) ; 
  3603. boolean scanwhitespace () {
  3604.     register boolean Result; while ( ( ( lexclass [ 
  3605.   buffer [ bufptr2 ] ] == 1 ) && ( bufptr2 < last ) ) ) incr ( bufptr2 ) ; 
  3606.   if ( ( bufptr2 < last ) ) 
  3607.   Result = true ; 
  3608.   else Result = false ; 
  3609.   return(Result) ; 
  3610. boolean eatbstwhitespace () {
  3611.     /* 10 */ register boolean Result; while ( true ) 
  3612.   {
  3613.     if ( ( scanwhitespace () ) ) 
  3614.     if ( ( buffer [ bufptr2 ] != 37 ) ) 
  3615.     {
  3616.       Result = true ; 
  3617.       goto lab10 ; 
  3618.     } 
  3619.     if ( ( ! inputln ( bstfile ) ) ) 
  3620.     {
  3621.       Result = false ; 
  3622.       goto lab10 ; 
  3623.     } 
  3624.     incr ( bstlinenum ) ; 
  3625.     bufptr2 = 0 ; 
  3626.   } 
  3627.   lab10: ; 
  3628.   return(Result) ; 
  3629. void skiptokenprint (void) {
  3630.     { 
  3631.     (void) FPutC( '-' , logfile );
  3632.     (void) FPutC( '-' );
  3633.   } 
  3634.   bstlnnumprint () ; 
  3635.   markerror () ; 
  3636.   if ( ( scan2white ( 125 , 37 ) ) ) 
  3637.   ; 
  3638. void printrecursionillega (void) {
  3639.     
  3640.     ;
  3641. #ifdef TRACE
  3642.   {
  3643.     (void) FPutC('¥r', logfile );
  3644.   } 
  3645. #endif /* TRACE */
  3646.   {
  3647.     (void) FPrintF( logfile , "%s¥r",  "Curse you, wizard, before you recurse me:" ) ; 
  3648.     (void) FPrintFStdErr( "%s¥r",  "Curse you, wizard, before you recurse me:" ) ; 
  3649.   } 
  3650.   {
  3651.     (void) ReverseFPuts( logfile ,  "function " ) ; 
  3652.     (void) FPrintFStdErr(  "function " ) ; 
  3653.   } 
  3654.   printatoken () ; 
  3655.   {
  3656.     (void) FPrintF( logfile , "%s¥r",  " is illegal in its own definition" ) ; 
  3657.     (void) FPrintFStdErr( "%s¥r",  " is illegal in its own definition" ) ; 
  3658.   } 
  3659.   skiptokenprint () ; 
  3660. void skptokenunknownfunct (void) {
  3661.     printatoken () ; 
  3662.   {
  3663.     (void) ReverseFPuts( logfile ,  " is an unknown function" ) ; 
  3664.     (void) FPrintFStdErr(  " is an unknown function" ) ; 
  3665.   } 
  3666.   skiptokenprint () ; 
  3667. void skipillegalstuffafte (void) {
  3668.     { 
  3669.     (void) FPrintF( logfile , "%c%c%s",  '"' , xchr [ buffer [ bufptr2 ] ] ,     "¥" can't follow a literal" ) ; 
  3670.     (void) FPrintFStdErr( "%c%c%s",  '"' , xchr [ buffer [ bufptr2 ] ] ,     "¥" can't follow a literal" ) ; 
  3671.   } 
  3672.   skiptokenprint () ; 
  3673. void
  3674. #ifdef STDC
  3675. zscanfndef (hashloc fnhashloc ) 
  3676. #else
  3677. zscanfndef ( fnhashloc ) 
  3678. hashloc fnhashloc ; 
  3679. #endif
  3680. {/* 25 10 */ typedef integer fndefloc  ; 
  3681.   hashptr2 singlfunction[singlefnspace + 1]  ; 
  3682.   fndefloc singleptr  ; 
  3683.   fndefloc copyptr  ; 
  3684.   bufpointer endofnum  ; 
  3685.   hashloc implfnloc  ; 
  3686.   {
  3687.     if ( ( ! eatbstwhitespace () ) ) 
  3688.     {
  3689.       eatbstprint () ; 
  3690.       {
  3691.     {
  3692.       (void) ReverseFPuts( logfile ,  "function" ) ; 
  3693.       (void) FPrintFStdErr(  "function" ) ; 
  3694.     } 
  3695.     {
  3696.       bsterrprintandlookfo () ; 
  3697.       goto lab10 ; 
  3698.     } 
  3699.       } 
  3700.     } 
  3701.   } 
  3702.   singleptr = 0 ; 
  3703.   while ( ( buffer [ bufptr2 ] != 125 ) ) {
  3704.       
  3705.     switch ( ( buffer [ bufptr2 ] ) ) 
  3706.     {case 35 : 
  3707.       {
  3708.     incr ( bufptr2 ) ; 
  3709.     if ( ( ! scaninteger () ) ) 
  3710.     {
  3711.       {
  3712.         (void) ReverseFPuts( logfile ,  "Illegal integer in integer literal" ) ; 
  3713.         (void) FPrintFStdErr(  "Illegal integer in integer literal" ) ; 
  3714.       } 
  3715.       skiptokenprint () ; 
  3716.       goto lab25 ; 
  3717.     } 
  3718.     ;
  3719. #ifdef TRACE
  3720.     {
  3721.       (void) FPutC( '#' , logfile );
  3722.     } 
  3723.     {
  3724.       outtoken ( logfile ) ; 
  3725.     } 
  3726.     {
  3727.       (void) FPrintF( logfile , "%s%ld¥r",  " is an integer literal with value " ,           (long)tokenvalue ) ; 
  3728.     } 
  3729. #endif /* TRACE */
  3730.     literalloc = strlookup ( buffer , bufptr1 , ( bufptr2 - bufptr1 ) , 1 
  3731.     , true ) ; 
  3732.     if ( ( ! hashfound ) ) 
  3733.     {
  3734.       fntype [ literalloc ] = 2 ; 
  3735.       ilkinfo [ literalloc ] = tokenvalue ; 
  3736.     } 
  3737.     if ( ( ( lexclass [ buffer [ bufptr2 ] ] != 1 ) && ( bufptr2 < last ) 
  3738.     && ( buffer [ bufptr2 ] != 125 ) && ( buffer [ bufptr2 ] != 37 ) ) ) 
  3739.     {
  3740.       skipillegalstuffafte () ; 
  3741.       goto lab25 ; 
  3742.     } 
  3743.     {
  3744.       singlfunction [ singleptr ] = literalloc ; 
  3745.       if ( ( singleptr == singlefnspace ) ) 
  3746.       singlfnoverflow () ; 
  3747.       incr ( singleptr ) ; 
  3748.     } 
  3749.       } 
  3750.       break ; 
  3751.     case 34 : 
  3752.       {
  3753.     incr ( bufptr2 ) ; 
  3754.     if ( ( ! scan1 ( 34 ) ) ) 
  3755.     {
  3756.       {
  3757.         (void) FPrintF( logfile , "%s%c%s",  "No `" , xchr [ 34 ] , "' to end string literal"             ) ; 
  3758.         (void) FPrintFStdErr( "%s%c%s",  "No `" , xchr [ 34 ] , "' to end string literal"             ) ; 
  3759.       } 
  3760.       skiptokenprint () ; 
  3761.       goto lab25 ; 
  3762.     } 
  3763.     ;
  3764. #ifdef TRACE
  3765.     {
  3766.       (void) FPutC( '"' , logfile );
  3767.     } 
  3768.     {
  3769.       outtoken ( logfile ) ; 
  3770.     } 
  3771.     {
  3772.       (void) FPutC( '"' , logfile );
  3773.     } 
  3774.     {
  3775.       (void) FPrintF( logfile , "%s¥r",  " is a string literal" ) ; 
  3776.     } 
  3777. #endif /* TRACE */
  3778.     literalloc = strlookup ( buffer , bufptr1 , ( bufptr2 - bufptr1 ) , 0 
  3779.     , true ) ; 
  3780.     fntype [ literalloc ] = 3 ; 
  3781.     incr ( bufptr2 ) ; 
  3782.     if ( ( ( lexclass [ buffer [ bufptr2 ] ] != 1 ) && ( bufptr2 < last ) 
  3783.     && ( buffer [ bufptr2 ] != 125 ) && ( buffer [ bufptr2 ] != 37 ) ) ) 
  3784.     {
  3785.       skipillegalstuffafte () ; 
  3786.       goto lab25 ; 
  3787.     } 
  3788.     {
  3789.       singlfunction [ singleptr ] = literalloc ; 
  3790.       if ( ( singleptr == singlefnspace ) ) 
  3791.       singlfnoverflow () ; 
  3792.       incr ( singleptr ) ; 
  3793.     } 
  3794.       } 
  3795.       break ; 
  3796.     case 39 : 
  3797.       {
  3798.     incr ( bufptr2 ) ; 
  3799.     if ( ( scan2white ( 125 , 37 ) ) ) 
  3800.     ; 
  3801.     ;
  3802. #ifdef TRACE
  3803.     {
  3804.       (void) FPutC( '¥'' , logfile );
  3805.     } 
  3806.     {
  3807.       outtoken ( logfile ) ; 
  3808.     } 
  3809.     {
  3810.       (void) ReverseFPuts( logfile ,  " is a quoted function " ) ; 
  3811.     } 
  3812. #endif /* TRACE */
  3813.     lowercase ( buffer , bufptr1 , ( bufptr2 - bufptr1 ) ) ; 
  3814.     fnloc = strlookup ( buffer , bufptr1 , ( bufptr2 - bufptr1 ) , 11 , 
  3815.     false ) ; 
  3816.     if ( ( ! hashfound ) ) 
  3817.     {
  3818.       skptokenunknownfunct () ; 
  3819.       goto lab25 ; 
  3820.     } 
  3821.     else {
  3822.         
  3823.       if ( ( fnloc == wizloc ) ) 
  3824.       {
  3825.         printrecursionillega () ; 
  3826.         goto lab25 ; 
  3827.       } 
  3828.       else {
  3829.           
  3830.     ;
  3831. #ifdef TRACE
  3832.         {
  3833.           (void) ReverseFPuts( logfile ,  "of type " ) ; 
  3834.         } 
  3835.         traceprfnclass ( fnloc ) ; 
  3836.         {
  3837.           (void) FPutC('¥r', logfile );
  3838.         } 
  3839. #endif /* TRACE */
  3840.         {
  3841.           singlfunction [ singleptr ] = 0 ; 
  3842.           if ( ( singleptr == singlefnspace ) ) 
  3843.           singlfnoverflow () ; 
  3844.           incr ( singleptr ) ; 
  3845.         } 
  3846.         {
  3847.           singlfunction [ singleptr ] = fnloc ; 
  3848.           if ( ( singleptr == singlefnspace ) ) 
  3849.           singlfnoverflow () ; 
  3850.           incr ( singleptr ) ; 
  3851.         } 
  3852.       } 
  3853.     } 
  3854.       } 
  3855.       break ; 
  3856.     case 123 : 
  3857.       {
  3858.     exbuf [ 0 ] = 39 ; 
  3859.     inttoASCII ( implfnnum , exbuf , 1 , endofnum ) ; 
  3860.     implfnloc = strlookup ( exbuf , 0 , endofnum , 11 , true ) ; 
  3861.     if ( ( hashfound ) ) 
  3862.     {
  3863.       {
  3864.         (void) ReverseFPuts( logfile ,  "Already encountered implicit function" ) ; 
  3865.         (void) FPrintFStdErr(  "Already encountered implicit function" ) ; 
  3866.       } 
  3867.       printconfusion () ; 
  3868.       longjmp(jmp9998,1) ; 
  3869.     } 
  3870.     ;
  3871. #ifdef TRACE
  3872.     {
  3873.       outpoolstr ( logfile , hashtext [ implfnloc ] ) ; 
  3874.     } 
  3875.     {
  3876.       (void) FPrintF( logfile , "%s¥r",  " is an implicit function" ) ; 
  3877.     } 
  3878. #endif /* TRACE */
  3879.     incr ( implfnnum ) ; 
  3880.     fntype [ implfnloc ] = 1 ; 
  3881.     {
  3882.       singlfunction [ singleptr ] = 0 ; 
  3883.       if ( ( singleptr == singlefnspace ) ) 
  3884.       singlfnoverflow () ; 
  3885.       incr ( singleptr ) ; 
  3886.     } 
  3887.     {
  3888.       singlfunction [ singleptr ] = implfnloc ; 
  3889.       if ( ( singleptr == singlefnspace ) ) 
  3890.       singlfnoverflow () ; 
  3891.       incr ( singleptr ) ; 
  3892.     } 
  3893.     incr ( bufptr2 ) ; 
  3894.     scanfndef ( implfnloc ) ; 
  3895.       } 
  3896.       break ; 
  3897.       default: 
  3898.       {
  3899.     if ( ( scan2white ( 125 , 37 ) ) ) 
  3900.     ; 
  3901.     ;
  3902. #ifdef TRACE
  3903.     {
  3904.       outtoken ( logfile ) ; 
  3905.     } 
  3906.     {
  3907.       (void) ReverseFPuts( logfile ,  " is a function " ) ; 
  3908.     } 
  3909. #endif /* TRACE */
  3910.     lowercase ( buffer , bufptr1 , ( bufptr2 - bufptr1 ) ) ; 
  3911.     fnloc = strlookup ( buffer , bufptr1 , ( bufptr2 - bufptr1 ) , 11 , 
  3912.     false ) ; 
  3913.     if ( ( ! hashfound ) ) 
  3914.     {
  3915.       skptokenunknownfunct () ; 
  3916.       goto lab25 ; 
  3917.     } 
  3918.     else if ( ( fnloc == wizloc ) ) 
  3919.     {
  3920.       printrecursionillega () ; 
  3921.       goto lab25 ; 
  3922.     } 
  3923.     else {
  3924.         
  3925.     ;
  3926. #ifdef TRACE
  3927.       {
  3928.         (void) ReverseFPuts( logfile ,  "of type " ) ; 
  3929.       } 
  3930.       traceprfnclass ( fnloc ) ; 
  3931.       {
  3932.         (void) FPutC('¥r', logfile );
  3933.       } 
  3934. #endif /* TRACE */
  3935.       {
  3936.         singlfunction [ singleptr ] = fnloc ; 
  3937.         if ( ( singleptr == singlefnspace ) ) 
  3938.         singlfnoverflow () ; 
  3939.         incr ( singleptr ) ; 
  3940.       } 
  3941.     } 
  3942.       } 
  3943.       break ; 
  3944.     } 
  3945.     lab25: {
  3946.     
  3947.       if ( ( ! eatbstwhitespace () ) ) 
  3948.       {
  3949.     eatbstprint () ; 
  3950.     {
  3951.       {
  3952.         (void) ReverseFPuts( logfile ,  "function" ) ; 
  3953.         (void) FPrintFStdErr(  "function" ) ; 
  3954.       } 
  3955.       {
  3956.         bsterrprintandlookfo () ; 
  3957.         goto lab10 ; 
  3958.       } 
  3959.     } 
  3960.       } 
  3961.     } 
  3962.   } 
  3963.   {
  3964.     {
  3965.       singlfunction [ singleptr ] = hashsize+1 ; 
  3966.       if ( ( singleptr == singlefnspace ) ) 
  3967.       singlfnoverflow () ; 
  3968.       incr ( singleptr ) ; 
  3969.     } 
  3970.     if ( ( singleptr + wizdefptr > wizfnspace ) ) 
  3971.     {
  3972.       {
  3973.     (void) FPrintF( logfile , "%ld%s",  (long)singleptr + wizdefptr , ": " ) ; 
  3974.     (void) FPrintFStdErr( "%ld%s",  (long)singleptr + wizdefptr , ": " ) ; 
  3975.       } 
  3976.       {
  3977.     printoverflow () ; 
  3978.     {
  3979.       (void) FPrintF( logfile , "%s%ld¥r",  "wizard-defined function space " , (long)wizfnspace ) 
  3980.       ; 
  3981.       (void) FPrintFStdErr( "%s%ld¥r",  "wizard-defined function space " , (long)wizfnspace ) ; 
  3982.     } 
  3983.     longjmp(jmp9998,1) ; 
  3984.       } 
  3985.     } 
  3986.     ilkinfo [ fnhashloc ] = wizdefptr ; 
  3987.     copyptr = 0 ; 
  3988.     while ( ( copyptr < singleptr ) ) {
  3989.     
  3990.       wizfunctions [ wizdefptr ] = singlfunction [ copyptr ] ; 
  3991.       incr ( copyptr ) ; 
  3992.       incr ( wizdefptr ) ; 
  3993.     } 
  3994.   } 
  3995.   incr ( bufptr2 ) ; 
  3996.   lab10: ; 
  3997. boolean eatbibwhitespace () {
  3998.     /* 10 */ register boolean Result; while ( ( ! 
  3999.   scanwhitespace () ) ) {
  4000.       
  4001.     if ( ( ! inputln ( bibfile [ bibptr ] ) ) ) 
  4002.     {
  4003.       Result = false ; 
  4004.       goto lab10 ; 
  4005.     } 
  4006.     incr ( biblinenum ) ; 
  4007.     bufptr2 = 0 ; 
  4008.   } 
  4009.   Result = true ; 
  4010.   lab10: ; 
  4011.   return(Result) ; 
  4012. boolean compressbibwhite () {
  4013.     /* 10 */ register boolean Result; Result = false 
  4014.   ; 
  4015.   {
  4016.     if ( ( exbufptr == bufsize ) ) 
  4017.     {
  4018.       bibfieldtoolongprint () ; 
  4019.       goto lab10 ; 
  4020.     } 
  4021.     else {
  4022.     
  4023.       exbuf [ exbufptr ] = 32 ; 
  4024.       incr ( exbufptr ) ; 
  4025.     } 
  4026.   } 
  4027.   while ( ( ! scanwhitespace () ) ) {
  4028.       
  4029.     if ( ( ! inputln ( bibfile [ bibptr ] ) ) ) 
  4030.     {
  4031.       eatbibprint () ; 
  4032.       goto lab10 ; 
  4033.     } 
  4034.     incr ( biblinenum ) ; 
  4035.     bufptr2 = 0 ; 
  4036.   } 
  4037.   Result = true ; 
  4038.   lab10: ; 
  4039.   return(Result) ; 
  4040. boolean scanbalancedbraces () {
  4041.     /* 15 10 */ register boolean Result; Result = 
  4042.   false ; 
  4043.   incr ( bufptr2 ) ; 
  4044.   {
  4045.     if ( ( ( lexclass [ buffer [ bufptr2 ] ] == 1 ) || ( bufptr2 == last ) ) ) 
  4046.     if ( ( ! compressbibwhite () ) ) 
  4047.     goto lab10 ; 
  4048.   } 
  4049.   if ( ( exbufptr > 1 ) ) 
  4050.   if ( ( exbuf [ exbufptr - 1 ] == 32 ) ) 
  4051.   if ( ( exbuf [ exbufptr - 2 ] == 32 ) ) 
  4052.   decr ( exbufptr ) ; 
  4053.   bibbracelevel = 0 ; 
  4054.   if ( ( storefield ) ) 
  4055.   {
  4056.     while ( ( buffer [ bufptr2 ] != rightstrdelim ) ) switch ( ( buffer [ 
  4057.     bufptr2 ] ) ) 
  4058.     {case 123 : 
  4059.       {
  4060.     incr ( bibbracelevel ) ; 
  4061.     {
  4062.       if ( ( exbufptr == bufsize ) ) 
  4063.       {
  4064.         bibfieldtoolongprint () ; 
  4065.         goto lab10 ; 
  4066.       } 
  4067.       else {
  4068.           
  4069.         exbuf [ exbufptr ] = 123 ; 
  4070.         incr ( exbufptr ) ; 
  4071.       } 
  4072.     } 
  4073.     incr ( bufptr2 ) ; 
  4074.     {
  4075.       if ( ( ( lexclass [ buffer [ bufptr2 ] ] == 1 ) || ( bufptr2 == last 
  4076.       ) ) ) 
  4077.       if ( ( ! compressbibwhite () ) ) 
  4078.       goto lab10 ; 
  4079.     } 
  4080.     {
  4081.       while ( true ) switch ( ( buffer [ bufptr2 ] ) ) 
  4082.       {case 125 : 
  4083.         {
  4084.           decr ( bibbracelevel ) ; 
  4085.           {
  4086.         if ( ( exbufptr == bufsize ) ) 
  4087.         {
  4088.           bibfieldtoolongprint () ; 
  4089.           goto lab10 ; 
  4090.         } 
  4091.         else {
  4092.             
  4093.           exbuf [ exbufptr ] = 125 ; 
  4094.           incr ( exbufptr ) ; 
  4095.         } 
  4096.           } 
  4097.           incr ( bufptr2 ) ; 
  4098.           {
  4099.         if ( ( ( lexclass [ buffer [ bufptr2 ] ] == 1 ) || ( bufptr2 
  4100.         == last ) ) ) 
  4101.         if ( ( ! compressbibwhite () ) ) 
  4102.         goto lab10 ; 
  4103.           } 
  4104.           if ( ( bibbracelevel == 0 ) ) 
  4105.           goto lab15 ; 
  4106.         } 
  4107.         break ; 
  4108.       case 123 : 
  4109.         {
  4110.           incr ( bibbracelevel ) ; 
  4111.           {
  4112.         if ( ( exbufptr == bufsize ) ) 
  4113.         {
  4114.           bibfieldtoolongprint () ; 
  4115.           goto lab10 ; 
  4116.         } 
  4117.         else {
  4118.             
  4119.           exbuf [ exbufptr ] = 123 ; 
  4120.           incr ( exbufptr ) ; 
  4121.         } 
  4122.           } 
  4123.           incr ( bufptr2 ) ; 
  4124.           {
  4125.         if ( ( ( lexclass [ buffer [ bufptr2 ] ] == 1 ) || ( bufptr2 
  4126.         == last ) ) ) 
  4127.         if ( ( ! compressbibwhite () ) ) 
  4128.         goto lab10 ; 
  4129.           } 
  4130.         } 
  4131.         break ; 
  4132.         default: 
  4133.         {
  4134.           {
  4135.         if ( ( exbufptr == bufsize ) ) 
  4136.         {
  4137.           bibfieldtoolongprint () ; 
  4138.           goto lab10 ; 
  4139.         } 
  4140.         else {
  4141.             
  4142.           exbuf [ exbufptr ] = buffer [ bufptr2 ] ; 
  4143.           incr ( exbufptr ) ; 
  4144.         } 
  4145.           } 
  4146.           incr ( bufptr2 ) ; 
  4147.           {
  4148.         if ( ( ( lexclass [ buffer [ bufptr2 ] ] == 1 ) || ( bufptr2 
  4149.         == last ) ) ) 
  4150.         if ( ( ! compressbibwhite () ) ) 
  4151.         goto lab10 ; 
  4152.           } 
  4153.         } 
  4154.         break ; 
  4155.       } 
  4156.       lab15: ; 
  4157.     } 
  4158.       } 
  4159.       break ; 
  4160.     case 125 : 
  4161.       {
  4162.     bibunbalancedbracesp () ; 
  4163.     goto lab10 ; 
  4164.       } 
  4165.       break ; 
  4166.       default: 
  4167.       {
  4168.     {
  4169.       if ( ( exbufptr == bufsize ) ) 
  4170.       {
  4171.         bibfieldtoolongprint () ; 
  4172.         goto lab10 ; 
  4173.       } 
  4174.       else {
  4175.           
  4176.         exbuf [ exbufptr ] = buffer [ bufptr2 ] ; 
  4177.         incr ( exbufptr ) ; 
  4178.       } 
  4179.     } 
  4180.     incr ( bufptr2 ) ; 
  4181.     {
  4182.       if ( ( ( lexclass [ buffer [ bufptr2 ] ] == 1 ) || ( bufptr2 == last 
  4183.       ) ) ) 
  4184.       if ( ( ! compressbibwhite () ) ) 
  4185.       goto lab10 ; 
  4186.     } 
  4187.       } 
  4188.       break ; 
  4189.     } 
  4190.   } 
  4191.   else {
  4192.       
  4193.     while ( ( buffer [ bufptr2 ] != rightstrdelim ) ) if ( ( buffer [ bufptr2 
  4194.     ] == 123 ) ) 
  4195.     {
  4196.       incr ( bibbracelevel ) ; 
  4197.       incr ( bufptr2 ) ; 
  4198.       {
  4199.     if ( ( ! eatbibwhitespace () ) ) 
  4200.     {
  4201.       eatbibprint () ; 
  4202.       goto lab10 ; 
  4203.     } 
  4204.       } 
  4205.       while ( ( bibbracelevel > 0 ) ) {
  4206.       
  4207.     if ( ( buffer [ bufptr2 ] == 125 ) ) 
  4208.     {
  4209.       decr ( bibbracelevel ) ; 
  4210.       incr ( bufptr2 ) ; 
  4211.       {
  4212.         if ( ( ! eatbibwhitespace () ) ) 
  4213.         {
  4214.           eatbibprint () ; 
  4215.           goto lab10 ; 
  4216.         } 
  4217.       } 
  4218.     } 
  4219.     else if ( ( buffer [ bufptr2 ] == 123 ) ) 
  4220.     {
  4221.       incr ( bibbracelevel ) ; 
  4222.       incr ( bufptr2 ) ; 
  4223.       {
  4224.         if ( ( ! eatbibwhitespace () ) ) 
  4225.         {
  4226.           eatbibprint () ; 
  4227.           goto lab10 ; 
  4228.         } 
  4229.       } 
  4230.     } 
  4231.     else {
  4232.         
  4233.       incr ( bufptr2 ) ; 
  4234.       if ( ( ! scan2 ( 125 , 123 ) ) ) 
  4235.       {
  4236.         if ( ( ! eatbibwhitespace () ) ) 
  4237.         {
  4238.           eatbibprint () ; 
  4239.           goto lab10 ; 
  4240.         } 
  4241.       } 
  4242.     } 
  4243.       } 
  4244.     } 
  4245.     else if ( ( buffer [ bufptr2 ] == 125 ) ) 
  4246.     {
  4247.       bibunbalancedbracesp () ; 
  4248.       goto lab10 ; 
  4249.     } 
  4250.     else {
  4251.     
  4252.       incr ( bufptr2 ) ; 
  4253.       if ( ( ! scan3 ( rightstrdelim , 123 , 125 ) ) ) 
  4254.       {
  4255.     if ( ( ! eatbibwhitespace () ) ) 
  4256.     {
  4257.       eatbibprint () ; 
  4258.       goto lab10 ; 
  4259.     } 
  4260.       } 
  4261.     } 
  4262.   } 
  4263.   incr ( bufptr2 ) ; 
  4264.   Result = true ; 
  4265.   lab10: ; 
  4266.   return(Result) ; 
  4267. boolean scanafieldtokenandea () {
  4268.     /* 10 */ register boolean Result; Result = 
  4269.   false ; 
  4270.   switch ( ( buffer [ bufptr2 ] ) ) 
  4271.   {case 123 : 
  4272.     {
  4273.       rightstrdelim = 125 ; 
  4274.       if ( ( ! scanbalancedbraces () ) ) 
  4275.       goto lab10 ; 
  4276.     } 
  4277.     break ; 
  4278.   case 34 : 
  4279.     {
  4280.       rightstrdelim = 34 ; 
  4281.       if ( ( ! scanbalancedbraces () ) ) 
  4282.       goto lab10 ; 
  4283.     } 
  4284.     break ; 
  4285.   case 48 : 
  4286.   case 49 : 
  4287.   case 50 : 
  4288.   case 51 : 
  4289.   case 52 : 
  4290.   case 53 : 
  4291.   case 54 : 
  4292.   case 55 : 
  4293.   case 56 : 
  4294.   case 57 : 
  4295.     {
  4296.       if ( ( ! scannonneginteger () ) ) 
  4297.       {
  4298.     {
  4299.       (void) ReverseFPuts( logfile ,  "A digit disappeared" ) ; 
  4300.       (void) FPrintFStdErr(  "A digit disappeared" ) ; 
  4301.     } 
  4302.     printconfusion () ; 
  4303.     longjmp(jmp9998,1) ; 
  4304.       } 
  4305.       if ( ( storefield ) ) 
  4306.       {
  4307.     tmpptr = bufptr1 ; 
  4308.     while ( ( tmpptr < bufptr2 ) ) {
  4309.         
  4310.       {
  4311.         if ( ( exbufptr == bufsize ) ) 
  4312.         {
  4313.           bibfieldtoolongprint () ; 
  4314.           goto lab10 ; 
  4315.         } 
  4316.         else {
  4317.         
  4318.           exbuf [ exbufptr ] = buffer [ tmpptr ] ; 
  4319.           incr ( exbufptr ) ; 
  4320.         } 
  4321.       } 
  4322.       incr ( tmpptr ) ; 
  4323.     } 
  4324.       } 
  4325.     } 
  4326.     break ; 
  4327.     default: 
  4328.     {
  4329.       scanidentifier ( 44 , rightouterdelim , 35 ) ; 
  4330.       {
  4331.     if ( ( ( scanresult == 3 ) || ( scanresult == 1 ) ) ) 
  4332.     ; 
  4333.     else {
  4334.         
  4335.       bibidprint () ; 
  4336.       {
  4337.         {
  4338.           (void) ReverseFPuts( logfile ,  "a field part" ) ; 
  4339.           (void) FPrintFStdErr(  "a field part" ) ; 
  4340.         } 
  4341.         biberrprint () ; 
  4342.         goto lab10 ; 
  4343.       } 
  4344.     } 
  4345.       } 
  4346.       if ( ( storefield ) ) 
  4347.       {
  4348.     lowercase ( buffer , bufptr1 , ( bufptr2 - bufptr1 ) ) ; 
  4349.     macronameloc = strlookup ( buffer , bufptr1 , ( bufptr2 - bufptr1 ) , 
  4350.     13 , false ) ; 
  4351.     storetoken = true ; 
  4352.     if ( ( atbibcommand ) ) 
  4353.     if ( ( commandnum == 2 ) ) 
  4354.     if ( ( macronameloc == curmacroloc ) ) 
  4355.     {
  4356.       storetoken = false ; 
  4357.       {
  4358.         macrowarnprint () ; 
  4359.         {
  4360.           {
  4361.         (void) FPrintF( logfile , "%s¥r",  "used in its own definition" ) ; 
  4362.         (void) FPrintFStdErr( "%s¥r",  "used in its own definition" ) ; 
  4363.           } 
  4364.           bibwarnprint () ; 
  4365.         } 
  4366.       } 
  4367.     } 
  4368.     if ( ( ! hashfound ) ) 
  4369.     {
  4370.       storetoken = false ; 
  4371.       {
  4372.         macrowarnprint () ; 
  4373.         {
  4374.           {
  4375.         (void) FPrintF( logfile , "%s¥r",  "undefined" ) ; 
  4376.         (void) FPrintFStdErr( "%s¥r",  "undefined" ) ; 
  4377.           } 
  4378.           bibwarnprint () ; 
  4379.         } 
  4380.       } 
  4381.     } 
  4382.     if ( ( storetoken ) ) 
  4383.     {
  4384.       tmpptr = strstart [ ilkinfo [ macronameloc ] ] ; 
  4385.       tmpendptr = strstart [ ilkinfo [ macronameloc ] + 1 ] ; 
  4386.       if ( ( exbufptr == 0 ) ) 
  4387.       if ( ( ( lexclass [ strpool [ tmpptr ] ] == 1 ) && ( tmpptr < 
  4388.       tmpendptr ) ) ) 
  4389.       {
  4390.         {
  4391.           if ( ( exbufptr == bufsize ) ) 
  4392.           {
  4393.         bibfieldtoolongprint () ; 
  4394.         goto lab10 ; 
  4395.           } 
  4396.           else {
  4397.           
  4398.         exbuf [ exbufptr ] = 32 ; 
  4399.         incr ( exbufptr ) ; 
  4400.           } 
  4401.         } 
  4402.         incr ( tmpptr ) ; 
  4403.         while ( ( ( lexclass [ strpool [ tmpptr ] ] == 1 ) && ( tmpptr < 
  4404.         tmpendptr ) ) ) incr ( tmpptr ) ; 
  4405.       } 
  4406.       while ( ( tmpptr < tmpendptr ) ) {
  4407.           
  4408.         if ( ( lexclass [ strpool [ tmpptr ] ] != 1 ) ) 
  4409.         {
  4410.           if ( ( exbufptr == bufsize ) ) 
  4411.           {
  4412.         bibfieldtoolongprint () ; 
  4413.         goto lab10 ; 
  4414.           } 
  4415.           else {
  4416.           
  4417.         exbuf [ exbufptr ] = strpool [ tmpptr ] ; 
  4418.         incr ( exbufptr ) ; 
  4419.           } 
  4420.         } 
  4421.         else if ( ( exbuf [ exbufptr - 1 ] != 32 ) ) 
  4422.         {
  4423.           if ( ( exbufptr == bufsize ) ) 
  4424.           {
  4425.         bibfieldtoolongprint () ; 
  4426.         goto lab10 ; 
  4427.           } 
  4428.           else {
  4429.           
  4430.         exbuf [ exbufptr ] = 32 ; 
  4431.         incr ( exbufptr ) ; 
  4432.           } 
  4433.         } 
  4434.         incr ( tmpptr ) ; 
  4435.       } 
  4436.     } 
  4437.       } 
  4438.     } 
  4439.     break ; 
  4440.   } 
  4441.   {
  4442.     if ( ( ! eatbibwhitespace () ) ) 
  4443.     {
  4444.       eatbibprint () ; 
  4445.       goto lab10 ; 
  4446.     } 
  4447.   } 
  4448.   Result = true ; 
  4449.   lab10: ; 
  4450.   return(Result) ; 
  4451. #include "BibTeX.h"
  4452.  
  4453. #include "BibTeX.p"
  4454. #include "globals.h"
  4455. #include "coerce.h"
  4456.  
  4457. boolean scanandstorethefield () {
  4458.     /* 10 */ register boolean Result; Result = 
  4459.   false ; 
  4460.   exbufptr = 0 ; 
  4461.   if ( ( ! scanafieldtokenandea () ) ) 
  4462.   goto lab10 ; 
  4463.   while ( ( buffer [ bufptr2 ] == 35 ) ) {
  4464.       
  4465.     incr ( bufptr2 ) ; 
  4466.     {
  4467.       if ( ( ! eatbibwhitespace () ) ) 
  4468.       {
  4469.     eatbibprint () ; 
  4470.     goto lab10 ; 
  4471.       } 
  4472.     } 
  4473.     if ( ( ! scanafieldtokenandea () ) ) 
  4474.     goto lab10 ; 
  4475.   } 
  4476.   if ( ( storefield ) ) 
  4477.   {
  4478.     if ( ( ! atbibcommand ) ) 
  4479.     if ( ( exbufptr > 0 ) ) 
  4480.     if ( ( exbuf [ exbufptr - 1 ] == 32 ) ) 
  4481.     decr ( exbufptr ) ; 
  4482.     if ( ( ( ! atbibcommand ) && ( exbuf [ 0 ] == 32 ) && ( exbufptr > 0 ) ) ) 
  4483.     exbufxptr = 1 ; 
  4484.     else exbufxptr = 0 ; 
  4485.     fieldvalloc = strlookup ( exbuf , exbufxptr , exbufptr - exbufxptr , 0 , 
  4486.     true ) ; 
  4487.     fntype [ fieldvalloc ] = 3 ; 
  4488.     ;
  4489. #ifdef TRACE
  4490.     {
  4491.       (void) FPutC( '"' , logfile );
  4492.     } 
  4493.     {
  4494.       outpoolstr ( logfile , hashtext [ fieldvalloc ] ) ; 
  4495.     } 
  4496.     {
  4497.       (void) FPrintF( logfile , "%s¥r",  "¥" is a field value" ) ; 
  4498.     } 
  4499. #endif /* TRACE */
  4500.     if ( ( atbibcommand ) ) 
  4501.     {
  4502.       switch ( ( commandnum ) ) 
  4503.       {case 1 : 
  4504.     {
  4505.       spreamble [ preambleptr ] = hashtext [ fieldvalloc ] ; 
  4506.       incr ( preambleptr ) ; 
  4507.     } 
  4508.     break ; 
  4509.       case 2 : 
  4510.     ilkinfo [ curmacroloc ] = hashtext [ fieldvalloc ] ; 
  4511.     break ; 
  4512.     default: 
  4513.     bibcmdconfusion () ; 
  4514.     break ; 
  4515.       } 
  4516.     } 
  4517.     else {
  4518.     
  4519.       fieldptr = entryciteptr * numfields + ilkinfo [ fieldnameloc ] ; 
  4520.       if ( ( fieldinfo [ fieldptr ] != 0 ) ) 
  4521.       {
  4522.     {
  4523.       (void) ReverseFPuts( logfile ,  "Warning--I'm ignoring " ) ; 
  4524.       (void) FPrintFStdErr(  "Warning--I'm ignoring " ) ; 
  4525.     } 
  4526.     printapoolstr ( citelist [ entryciteptr ] ) ; 
  4527.     {
  4528.       (void) ReverseFPuts( logfile ,  "'s extra ¥"" ) ; 
  4529.       (void) FPrintFStdErr(  "'s extra ¥"" ) ; 
  4530.     } 
  4531.     printapoolstr ( hashtext [ fieldnameloc ] ) ; 
  4532.     {
  4533.       {
  4534.         (void) FPrintF( logfile , "%s¥r",  "¥" field" ) ; 
  4535.         (void) FPrintFStdErr( "%s¥r",  "¥" field" ) ; 
  4536.       } 
  4537.       bibwarnprint () ; 
  4538.     } 
  4539.       } 
  4540.       else {
  4541.       
  4542.     fieldinfo [ fieldptr ] = hashtext [ fieldvalloc ] ; 
  4543.     if ( ( ( ilkinfo [ fieldnameloc ] == crossrefnum ) && ( ! allentries ) 
  4544.     ) ) 
  4545.     {
  4546.       tmpptr = exbufxptr ; 
  4547.       while ( ( tmpptr < exbufptr ) ) {
  4548.           
  4549.         outbuf [ tmpptr ] = exbuf [ tmpptr ] ; 
  4550.         incr ( tmpptr ) ; 
  4551.       } 
  4552.       lowercase ( outbuf , exbufxptr , exbufptr - exbufxptr ) ; 
  4553.       lcciteloc = strlookup ( outbuf , exbufxptr , exbufptr - exbufxptr , 
  4554.       10 , true ) ; 
  4555.       if ( ( hashfound ) ) 
  4556.       {
  4557.         citeloc = ilkinfo [ lcciteloc ] ; 
  4558.         if ( ( ilkinfo [ citeloc ] >= oldnumcites ) ) 
  4559.         incr ( citeinfo [ ilkinfo [ citeloc ] ] ) ; 
  4560.       } 
  4561.       else {
  4562.           
  4563.         citeloc = strlookup ( exbuf , exbufxptr , exbufptr - exbufxptr , 9 
  4564.         , true ) ; 
  4565.         if ( ( hashfound ) ) 
  4566.         hashciteconfusion () ; 
  4567.         adddatabasecite ( citeptr ) ; 
  4568.         citeinfo [ ilkinfo [ citeloc ] ] = 1 ; 
  4569.       } 
  4570.     } 
  4571.       } 
  4572.     } 
  4573.   } 
  4574.   Result = true ; 
  4575.   lab10: ; 
  4576.   return(Result) ; 
  4577. void
  4578. #ifdef STDC
  4579. zdecrbracelevel (strnumber poplitvar ) 
  4580. #else
  4581. zdecrbracelevel ( poplitvar ) 
  4582. strnumber poplitvar ; 
  4583. #endif
  4584. {if ( ( bracelevel == 0 ) ) 
  4585.   bracesunbalancedcomp ( poplitvar ) ; 
  4586.   else decr ( bracelevel ) ; 
  4587. void
  4588. #ifdef STDC
  4589. zcheckbracelevel (strnumber poplitvar ) 
  4590. #else
  4591. zcheckbracelevel ( poplitvar ) 
  4592. strnumber poplitvar ; 
  4593. #endif
  4594. {if ( ( bracelevel > 0 ) ) 
  4595.   bracesunbalancedcomp ( poplitvar ) ; 
  4596. void
  4597. #ifdef STDC
  4598. znamescanforand (strnumber poplitvar ) 
  4599. #else
  4600. znamescanforand ( poplitvar ) 
  4601. strnumber poplitvar ; 
  4602. #endif
  4603. {bracelevel = 0 ; 
  4604.   precedingwhite = false ; 
  4605.   andfound = false ; 
  4606.   while ( ( ( ! andfound ) && ( exbufptr < exbuflength ) ) ) switch ( ( exbuf 
  4607.   [ exbufptr ] ) ) 
  4608.   {case 97 : 
  4609.   case 65 : 
  4610.     {
  4611.       incr ( exbufptr ) ; 
  4612.       if ( ( precedingwhite ) ) 
  4613.       {
  4614.     if ( ( exbufptr <= ( exbuflength - 3 ) ) ) 
  4615.     if ( ( ( exbuf [ exbufptr ] == 110 ) || ( exbuf [ exbufptr ] == 78 ) ) 
  4616.     ) 
  4617.     if ( ( ( exbuf [ exbufptr + 1 ] == 100 ) || ( exbuf [ exbufptr + 1 ] 
  4618.     == 68 ) ) ) 
  4619.     if ( ( lexclass [ exbuf [ exbufptr + 2 ] ] == 1 ) ) 
  4620.     {
  4621.       exbufptr = exbufptr + 2 ; 
  4622.       andfound = true ; 
  4623.     } 
  4624.       } 
  4625.       precedingwhite = false ; 
  4626.     } 
  4627.     break ; 
  4628.   case 123 : 
  4629.     {
  4630.       incr ( bracelevel ) ; 
  4631.       incr ( exbufptr ) ; 
  4632.       while ( ( ( bracelevel > 0 ) && ( exbufptr < exbuflength ) ) ) {
  4633.       
  4634.     if ( ( exbuf [ exbufptr ] == 125 ) ) 
  4635.     decr ( bracelevel ) ; 
  4636.     else if ( ( exbuf [ exbufptr ] == 123 ) ) 
  4637.     incr ( bracelevel ) ; 
  4638.     incr ( exbufptr ) ; 
  4639.       } 
  4640.       precedingwhite = false ; 
  4641.     } 
  4642.     break ; 
  4643.   case 125 : 
  4644.     {
  4645.       decrbracelevel ( poplitvar ) ; 
  4646.       incr ( exbufptr ) ; 
  4647.       precedingwhite = false ; 
  4648.     } 
  4649.     break ; 
  4650.     default: 
  4651.     if ( ( lexclass [ exbuf [ exbufptr ] ] == 1 ) ) 
  4652.     {
  4653.       incr ( exbufptr ) ; 
  4654.       precedingwhite = true ; 
  4655.     } 
  4656.     else {
  4657.     
  4658.       incr ( exbufptr ) ; 
  4659.       precedingwhite = false ; 
  4660.     } 
  4661.     break ; 
  4662.   } 
  4663.   checkbracelevel ( poplitvar ) ; 
  4664. boolean vontokenfound () {
  4665.     /* 10 */ register boolean Result; nmbracelevel = 0 
  4666.   ; 
  4667.   Result = false ; 
  4668.   while ( ( namebfptr < namebfxptr ) ) if ( ( ( svbuffer [ namebfptr ] >= 65 ) 
  4669.   && ( svbuffer [ namebfptr ] <= 90 ) ) ) 
  4670.   goto lab10 ; 
  4671.   else if ( ( ( svbuffer [ namebfptr ] >= 97 ) && ( svbuffer [ namebfptr ] <= 
  4672.   122 ) ) ) 
  4673.   {
  4674.     Result = true ; 
  4675.     goto lab10 ; 
  4676.   } 
  4677.   else if ( ( svbuffer [ namebfptr ] == 123 ) ) 
  4678.   {
  4679.     incr ( nmbracelevel ) ; 
  4680.     incr ( namebfptr ) ; 
  4681.     if ( ( ( namebfptr + 2 < namebfxptr ) && ( svbuffer [ namebfptr ] == 92 ) 
  4682.     ) ) 
  4683.     {
  4684.       incr ( namebfptr ) ; 
  4685.       namebfyptr = namebfptr ; 
  4686.       while ( ( ( namebfptr < namebfxptr ) && ( lexclass [ svbuffer [ 
  4687.       namebfptr ] ] == 2 ) ) ) incr ( namebfptr ) ; 
  4688.       controlseqloc = strlookup ( svbuffer , namebfyptr , namebfptr - 
  4689.       namebfyptr , 14 , false ) ; 
  4690.       if ( ( hashfound ) ) 
  4691.       {
  4692.     switch ( ( ilkinfo [ controlseqloc ] ) ) 
  4693.     {case 3 : 
  4694.     case 5 : 
  4695.     case 7 : 
  4696.     case 9 : 
  4697.     case 11 : 
  4698.       goto lab10 ; 
  4699.       break ; 
  4700.     case 0 : 
  4701.     case 1 : 
  4702.     case 2 : 
  4703.     case 4 : 
  4704.     case 6 : 
  4705.     case 8 : 
  4706.     case 10 : 
  4707.     case 12 : 
  4708.       {
  4709.         Result = true ; 
  4710.         goto lab10 ; 
  4711.       } 
  4712.       break ; 
  4713.       default: 
  4714.       {
  4715.         {
  4716.           (void) ReverseFPuts( logfile ,  "Control-sequence hash error" ) ; 
  4717.           (void) FPrintFStdErr(  "Control-sequence hash error" ) ; 
  4718.         } 
  4719.         printconfusion () ; 
  4720.         longjmp(jmp9998,1) ; 
  4721.       } 
  4722.       break ; 
  4723.     } 
  4724.       } 
  4725.       while ( ( ( namebfptr < namebfxptr ) && ( nmbracelevel > 0 ) ) ) {
  4726.       
  4727.     if ( ( ( svbuffer [ namebfptr ] >= 65 ) && ( svbuffer [ namebfptr ] <= 
  4728.     90 ) ) ) 
  4729.     goto lab10 ; 
  4730.     else if ( ( ( svbuffer [ namebfptr ] >= 97 ) && ( svbuffer [ namebfptr 
  4731.     ] <= 122 ) ) ) 
  4732.     {
  4733.       Result = true ; 
  4734.       goto lab10 ; 
  4735.     } 
  4736.     else if ( ( svbuffer [ namebfptr ] == 125 ) ) 
  4737.     decr ( nmbracelevel ) ; 
  4738.     else if ( ( svbuffer [ namebfptr ] == 123 ) ) 
  4739.     incr ( nmbracelevel ) ; 
  4740.     incr ( namebfptr ) ; 
  4741.       } 
  4742.       goto lab10 ; 
  4743.     } 
  4744.     else while ( ( ( nmbracelevel > 0 ) && ( namebfptr < namebfxptr ) ) ) {
  4745.     
  4746.       if ( ( svbuffer [ namebfptr ] == 125 ) ) 
  4747.       decr ( nmbracelevel ) ; 
  4748.       else if ( ( svbuffer [ namebfptr ] == 123 ) ) 
  4749.       incr ( nmbracelevel ) ; 
  4750.       incr ( namebfptr ) ; 
  4751.     } 
  4752.   } 
  4753.   else incr ( namebfptr ) ; 
  4754.   lab10: ; 
  4755.   return(Result) ; 
  4756. void vonnameendsandlastna (void) {
  4757.     /* 10 */ vonend = lastend - 1 ; 
  4758.   while ( ( vonend > vonstart ) ) {
  4759.       
  4760.     namebfptr = nametok [ vonend - 1 ] ; 
  4761.     namebfxptr = nametok [ vonend ] ; 
  4762.     if ( ( vontokenfound () ) ) 
  4763.     goto lab10 ; 
  4764.     decr ( vonend ) ; 
  4765.   } 
  4766.   lab10: ; 
  4767. void skipstuffatspbracele (void) {
  4768.     while ( ( ( spbracelevel > 1 ) && ( spptr < spend ) 
  4769.   ) ) {
  4770.       
  4771.     if ( ( strpool [ spptr ] == 125 ) ) 
  4772.     decr ( spbracelevel ) ; 
  4773.     else if ( ( strpool [ spptr ] == 123 ) ) 
  4774.     incr ( spbracelevel ) ; 
  4775.     incr ( spptr ) ; 
  4776.   } 
  4777. void bracelvlonelettersco (void) {
  4778.     { 
  4779.     (void) ReverseFPuts( logfile ,  "The format string ¥"" ) ; 
  4780.     (void) FPrintFStdErr(  "The format string ¥"" ) ; 
  4781.   } 
  4782.   printapoolstr ( poplit1 ) ; 
  4783.   {
  4784.     {
  4785.       (void) ReverseFPuts( logfile ,  "¥" has an illegal brace-level-1 letter" ) ; 
  4786.       (void) FPrintFStdErr(  "¥" has an illegal brace-level-1 letter" ) ; 
  4787.     } 
  4788.     bstexwarnprint () ; 
  4789.   } 
  4790. #ifdef STDC
  4791. boolean zenoughtextchars (bufpointer enoughchars ) 
  4792. #else
  4793. boolean zenoughtextchars ( enoughchars ) 
  4794. bufpointer enoughchars ; 
  4795. #endif
  4796. {register boolean Result; numtextchars = 0 ; 
  4797.   exbufyptr = exbufxptr ; 
  4798.   while ( ( ( exbufyptr < exbufptr ) && ( numtextchars < enoughchars ) ) ) {
  4799.       
  4800.     incr ( exbufyptr ) ; 
  4801.     if ( ( exbuf [ exbufyptr - 1 ] == 123 ) ) 
  4802.     {
  4803.       incr ( bracelevel ) ; 
  4804.       if ( ( ( bracelevel == 1 ) && ( exbufyptr < exbufptr ) ) ) 
  4805.       if ( ( exbuf [ exbufyptr ] == 92 ) ) 
  4806.       {
  4807.     incr ( exbufyptr ) ; 
  4808.     while ( ( ( exbufyptr < exbufptr ) && ( bracelevel > 0 ) ) ) {
  4809.         
  4810.       if ( ( exbuf [ exbufyptr ] == 125 ) ) 
  4811.       decr ( bracelevel ) ; 
  4812.       else if ( ( exbuf [ exbufyptr ] == 123 ) ) 
  4813.       incr ( bracelevel ) ; 
  4814.       incr ( exbufyptr ) ; 
  4815.     } 
  4816.       } 
  4817.     } 
  4818.     else if ( ( exbuf [ exbufyptr - 1 ] == 125 ) ) 
  4819.     decr ( bracelevel ) ; 
  4820.     incr ( numtextchars ) ; 
  4821.   } 
  4822.   if ( ( numtextchars < enoughchars ) ) 
  4823.   Result = false ; 
  4824.   else Result = true ; 
  4825.   return(Result) ; 
  4826. void figureouttheformatte (void) {
  4827.     /* 15 */ { 
  4828.     exbufptr = 0 ; 
  4829.     spbracelevel = 0 ; 
  4830.     spptr = strstart [ poplit1 ] ; 
  4831.     spend = strstart [ poplit1 + 1 ] ; 
  4832.     while ( ( spptr < spend ) ) if ( ( strpool [ spptr ] == 123 ) ) 
  4833.     {
  4834.       incr ( spbracelevel ) ; 
  4835.       incr ( spptr ) ; 
  4836.       {
  4837.     spxptr1 = spptr ; 
  4838.     alphafound = false ; 
  4839.     doubleletter = false ; 
  4840.     endofgroup = false ; 
  4841.     tobewritten = true ; 
  4842.     while ( ( ( ! endofgroup ) && ( spptr < spend ) ) ) if ( ( lexclass [ 
  4843.     strpool [ spptr ] ] == 2 ) ) 
  4844.     {
  4845.       incr ( spptr ) ; 
  4846.       {
  4847.         if ( ( alphafound ) ) 
  4848.         {
  4849.           bracelvlonelettersco () ; 
  4850.           tobewritten = false ; 
  4851.         } 
  4852.         else {
  4853.         
  4854.           switch ( ( strpool [ spptr - 1 ] ) ) 
  4855.           {case 102 : 
  4856.           case 70 : 
  4857.         {
  4858.           curtoken = firststart ; 
  4859.           lasttoken = firstend ; 
  4860.           if ( ( curtoken == lasttoken ) ) 
  4861.           tobewritten = false ; 
  4862.           if ( ( ( strpool [ spptr ] == 102 ) || ( strpool [ spptr ] 
  4863.           == 70 ) ) ) 
  4864.           doubleletter = true ; 
  4865.         } 
  4866.         break ; 
  4867.           case 118 : 
  4868.           case 86 : 
  4869.         {
  4870.           curtoken = vonstart ; 
  4871.           lasttoken = vonend ; 
  4872.           if ( ( curtoken == lasttoken ) ) 
  4873.           tobewritten = false ; 
  4874.           if ( ( ( strpool [ spptr ] == 118 ) || ( strpool [ spptr ] 
  4875.           == 86 ) ) ) 
  4876.           doubleletter = true ; 
  4877.         } 
  4878.         break ; 
  4879.           case 108 : 
  4880.           case 76 : 
  4881.         {
  4882.           curtoken = vonend ; 
  4883.           lasttoken = lastend ; 
  4884.           if ( ( curtoken == lasttoken ) ) 
  4885.           tobewritten = false ; 
  4886.           if ( ( ( strpool [ spptr ] == 108 ) || ( strpool [ spptr ] 
  4887.           == 76 ) ) ) 
  4888.           doubleletter = true ; 
  4889.         } 
  4890.         break ; 
  4891.           case 106 : 
  4892.           case 74 : 
  4893.         {
  4894.           curtoken = lastend ; 
  4895.           lasttoken = jrend ; 
  4896.           if ( ( curtoken == lasttoken ) ) 
  4897.           tobewritten = false ; 
  4898.           if ( ( ( strpool [ spptr ] == 106 ) || ( strpool [ spptr ] 
  4899.           == 74 ) ) ) 
  4900.           doubleletter = true ; 
  4901.         } 
  4902.         break ; 
  4903.         default: 
  4904.         {
  4905.           bracelvlonelettersco () ; 
  4906.           tobewritten = false ; 
  4907.         } 
  4908.         break ; 
  4909.           } 
  4910.           if ( ( doubleletter ) ) 
  4911.           incr ( spptr ) ; 
  4912.         } 
  4913.         alphafound = true ; 
  4914.       } 
  4915.     } 
  4916.     else if ( ( strpool [ spptr ] == 125 ) ) 
  4917.     {
  4918.       decr ( spbracelevel ) ; 
  4919.       incr ( spptr ) ; 
  4920.       endofgroup = true ; 
  4921.     } 
  4922.     else if ( ( strpool [ spptr ] == 123 ) ) 
  4923.     {
  4924.       incr ( spbracelevel ) ; 
  4925.       incr ( spptr ) ; 
  4926.       skipstuffatspbracele () ; 
  4927.     } 
  4928.     else incr ( spptr ) ; 
  4929.     if ( ( ( endofgroup ) && ( tobewritten ) ) ) 
  4930.     {
  4931.       exbufxptr = exbufptr ; 
  4932.       spptr = spxptr1 ; 
  4933.       spbracelevel = 1 ; 
  4934.       while ( ( spbracelevel > 0 ) ) if ( ( ( lexclass [ strpool [ spptr ] 
  4935.       ] == 2 ) && ( spbracelevel == 1 ) ) ) 
  4936.       {
  4937.         incr ( spptr ) ; 
  4938.         {
  4939.           if ( ( doubleletter ) ) 
  4940.           incr ( spptr ) ; 
  4941.           usedefault = true ; 
  4942.           spxptr2 = spptr ; 
  4943.           if ( ( strpool [ spptr ] == 123 ) ) 
  4944.           {
  4945.         usedefault = false ; 
  4946.         incr ( spbracelevel ) ; 
  4947.         incr ( spptr ) ; 
  4948.         spxptr1 = spptr ; 
  4949.         skipstuffatspbracele () ; 
  4950.         spxptr2 = spptr - 1 ; 
  4951.           } 
  4952.           while ( ( curtoken < lasttoken ) ) {
  4953.           
  4954.         if ( ( doubleletter ) ) 
  4955.         {
  4956.           namebfptr = nametok [ curtoken ] ; 
  4957.           namebfxptr = nametok [ curtoken + 1 ] ; 
  4958.           if ( ( exbuflength + ( namebfxptr - namebfptr ) > bufsize ) 
  4959.           ) 
  4960.           bufferoverflow () ; 
  4961.           while ( ( namebfptr < namebfxptr ) ) {
  4962.               
  4963.             {
  4964.               exbuf [ exbufptr ] = svbuffer [ namebfptr ] ; 
  4965.               incr ( exbufptr ) ; 
  4966.             } 
  4967.             incr ( namebfptr ) ; 
  4968.           } 
  4969.         } 
  4970.         else {
  4971.             
  4972.           namebfptr = nametok [ curtoken ] ; 
  4973.           namebfxptr = nametok [ curtoken + 1 ] ; 
  4974.           while ( ( namebfptr < namebfxptr ) ) {
  4975.               
  4976.             if ( ( lexclass [ svbuffer [ namebfptr ] ] == 2 ) ) 
  4977.             {
  4978.               {
  4979.             if ( ( exbufptr == bufsize ) ) 
  4980.             bufferoverflow () ; 
  4981.             {
  4982.               exbuf [ exbufptr ] = svbuffer [ namebfptr ] ; 
  4983.               incr ( exbufptr ) ; 
  4984.             } 
  4985.               } 
  4986.               goto lab15 ; 
  4987.             } 
  4988.             else if ( ( ( svbuffer [ namebfptr ] == 123 ) && ( 
  4989.             namebfptr + 1 < namebfxptr ) ) ) 
  4990.             if ( ( svbuffer [ namebfptr + 1 ] == 92 ) ) 
  4991.             {
  4992.               if ( ( exbufptr + 2 > bufsize ) ) 
  4993.               bufferoverflow () ; 
  4994.               {
  4995.             exbuf [ exbufptr ] = 123 ; 
  4996.             incr ( exbufptr ) ; 
  4997.               } 
  4998.               {
  4999.             exbuf [ exbufptr ] = 92 ; 
  5000.             incr ( exbufptr ) ; 
  5001.               } 
  5002.               namebfptr = namebfptr + 2 ; 
  5003.               nmbracelevel = 1 ; 
  5004.               while ( ( ( namebfptr < namebfxptr ) && ( nmbracelevel > 
  5005.               0 ) ) ) {
  5006.               
  5007.             if ( ( svbuffer [ namebfptr ] == 125 ) ) 
  5008.             decr ( nmbracelevel ) ; 
  5009.             else if ( ( svbuffer [ namebfptr ] == 123 ) ) 
  5010.             incr ( nmbracelevel ) ; 
  5011.             {
  5012.               if ( ( exbufptr == bufsize ) ) 
  5013.               bufferoverflow () ; 
  5014.               {
  5015.                 exbuf [ exbufptr ] = svbuffer [ namebfptr ] ; 
  5016.                 incr ( exbufptr ) ; 
  5017.               } 
  5018.             } 
  5019.             incr ( namebfptr ) ; 
  5020.               } 
  5021.               goto lab15 ; 
  5022.             } 
  5023.             incr ( namebfptr ) ; 
  5024.           } 
  5025.           lab15: ; 
  5026.         } 
  5027.         incr ( curtoken ) ; 
  5028.         if ( ( curtoken < lasttoken ) ) 
  5029.         {
  5030.           if ( ( usedefault ) ) 
  5031.           {
  5032.             if ( ( ! doubleletter ) ) 
  5033.             {
  5034.               if ( ( exbufptr == bufsize ) ) 
  5035.               bufferoverflow () ; 
  5036.               {
  5037.             exbuf [ exbufptr ] = 46 ; 
  5038.             incr ( exbufptr ) ; 
  5039.               } 
  5040.             } 
  5041.             if ( ( lexclass [ namesepchar [ curtoken ] ] == 4 ) ) 
  5042.             {
  5043.               if ( ( exbufptr == bufsize ) ) 
  5044.               bufferoverflow () ; 
  5045.               {
  5046.             exbuf [ exbufptr ] = namesepchar [ curtoken ] ; 
  5047.             incr ( exbufptr ) ; 
  5048.               } 
  5049.             } 
  5050.             else if ( ( ( curtoken == lasttoken - 1 ) || ( ! 
  5051.             enoughtextchars ( 3 ) ) ) ) 
  5052.             {
  5053.               if ( ( exbufptr == bufsize ) ) 
  5054.               bufferoverflow () ; 
  5055.               {
  5056.             exbuf [ exbufptr ] = 126 ; 
  5057.             incr ( exbufptr ) ; 
  5058.               } 
  5059.             } 
  5060.             else {
  5061.             
  5062.               if ( ( exbufptr == bufsize ) ) 
  5063.               bufferoverflow () ; 
  5064.               {
  5065.             exbuf [ exbufptr ] = 32 ; 
  5066.             incr ( exbufptr ) ; 
  5067.               } 
  5068.             } 
  5069.           } 
  5070.           else {
  5071.               
  5072.             if ( ( exbuflength + ( spxptr2 - spxptr1 ) > bufsize ) ) 
  5073.             bufferoverflow () ; 
  5074.             spptr = spxptr1 ; 
  5075.             while ( ( spptr < spxptr2 ) ) {
  5076.             
  5077.               {
  5078.             exbuf [ exbufptr ] = strpool [ spptr ] ; 
  5079.             incr ( exbufptr ) ; 
  5080.               } 
  5081.               incr ( spptr ) ; 
  5082.             } 
  5083.           } 
  5084.         } 
  5085.           } 
  5086.           if ( ( ! usedefault ) ) 
  5087.           spptr = spxptr2 + 1 ; 
  5088.         } 
  5089.       } 
  5090.       else if ( ( strpool [ spptr ] == 125 ) ) 
  5091.       {
  5092.         decr ( spbracelevel ) ; 
  5093.         incr ( spptr ) ; 
  5094.         if ( ( spbracelevel > 0 ) ) 
  5095.         {
  5096.           if ( ( exbufptr == bufsize ) ) 
  5097.           bufferoverflow () ; 
  5098.           {
  5099.         exbuf [ exbufptr ] = 125 ; 
  5100.         incr ( exbufptr ) ; 
  5101.           } 
  5102.         } 
  5103.       } 
  5104.       else if ( ( strpool [ spptr ] == 123 ) ) 
  5105.       {
  5106.         incr ( spbracelevel ) ; 
  5107.         incr ( spptr ) ; 
  5108.         {
  5109.           if ( ( exbufptr == bufsize ) ) 
  5110.           bufferoverflow () ; 
  5111.           {
  5112.         exbuf [ exbufptr ] = 123 ; 
  5113.         incr ( exbufptr ) ; 
  5114.           } 
  5115.         } 
  5116.       } 
  5117.       else {
  5118.           
  5119.         {
  5120.           if ( ( exbufptr == bufsize ) ) 
  5121.           bufferoverflow () ; 
  5122.           {
  5123.         exbuf [ exbufptr ] = strpool [ spptr ] ; 
  5124.         incr ( exbufptr ) ; 
  5125.           } 
  5126.         } 
  5127.         incr ( spptr ) ; 
  5128.       } 
  5129.       if ( ( exbufptr > 0 ) ) 
  5130.       if ( ( exbuf [ exbufptr - 1 ] == 126 ) ) 
  5131.       {
  5132.         decr ( exbufptr ) ; 
  5133.         if ( ( exbuf [ exbufptr - 1 ] == 126 ) ) 
  5134.         ; 
  5135.         else if ( ( ! enoughtextchars ( 3 ) ) ) 
  5136.         incr ( exbufptr ) ; 
  5137.         else {
  5138.         
  5139.           exbuf [ exbufptr ] = 32 ; 
  5140.           incr ( exbufptr ) ; 
  5141.         } 
  5142.       } 
  5143.     } 
  5144.       } 
  5145.     } 
  5146.     else if ( ( strpool [ spptr ] == 125 ) ) 
  5147.     {
  5148.       bracesunbalancedcomp ( poplit1 ) ; 
  5149.       incr ( spptr ) ; 
  5150.     } 
  5151.     else {
  5152.     
  5153.       {
  5154.     if ( ( exbufptr == bufsize ) ) 
  5155.     bufferoverflow () ; 
  5156.     {
  5157.       exbuf [ exbufptr ] = strpool [ spptr ] ; 
  5158.       incr ( exbufptr ) ; 
  5159.     } 
  5160.       } 
  5161.       incr ( spptr ) ; 
  5162.     } 
  5163.     if ( ( spbracelevel > 0 ) ) 
  5164.     bracesunbalancedcomp ( poplit1 ) ; 
  5165.     exbuflength = exbufptr ; 
  5166.   } 
  5167. void
  5168. #ifdef STDC
  5169. zpushlitstk (integer pushlt ,stktype pushtype ) 
  5170. #else
  5171. zpushlitstk ( pushlt , pushtype ) 
  5172. integer pushlt ; 
  5173. stktype pushtype ; 
  5174. #endif
  5175. {
  5176. #ifdef TRACE
  5177.   litstkloc dumptr  ; 
  5178. #endif /* TRACE */
  5179.   litstack [ litstkptr ] = pushlt ; 
  5180.   litstktype [ litstkptr ] = pushtype ; 
  5181.     ;
  5182. #ifdef TRACE
  5183.   {register integer for_end; dumptr = 0 ; for_end = litstkptr ; if ( dumptr 
  5184.   <= for_end) do 
  5185.     {
  5186.       (void) ReverseFPuts( logfile ,  "  " ) ; 
  5187.     } 
  5188.   while ( dumptr++ < for_end ) ; } 
  5189.   {
  5190.     (void) ReverseFPuts( logfile ,  "Pushing " ) ; 
  5191.   } 
  5192.   switch ( ( litstktype [ litstkptr ] ) ) 
  5193.   {case 0 : 
  5194.     {
  5195.       (void) FPrintF( logfile , "%ld¥r",  (long)litstack [ litstkptr ] ) ; 
  5196.     } 
  5197.     break ; 
  5198.   case 1 : 
  5199.     {
  5200.       {
  5201.     (void) FPutC( '"' , logfile );
  5202.       } 
  5203.       {
  5204.     outpoolstr ( logfile , litstack [ litstkptr ] ) ; 
  5205.       } 
  5206.       {
  5207.     (void) FPrintF( logfile , "%c¥r",  '"' ) ; 
  5208.       } 
  5209.     } 
  5210.     break ; 
  5211.   case 2 : 
  5212.     {
  5213.       {
  5214.     (void) FPutC( '`' , logfile );
  5215.       } 
  5216.       {
  5217.     outpoolstr ( logfile , hashtext [ litstack [ litstkptr ] ] ) ; 
  5218.       } 
  5219.       {
  5220.     (void) FPrintF( logfile , "%c¥r",  '¥'' ) ; 
  5221.       } 
  5222.     } 
  5223.     break ; 
  5224.   case 3 : 
  5225.     {
  5226.       {
  5227.     (void) ReverseFPuts( logfile ,  "missing field `" ) ; 
  5228.       } 
  5229.       {
  5230.     outpoolstr ( logfile , litstack [ litstkptr ] ) ; 
  5231.       } 
  5232.       {
  5233.     (void) FPrintF( logfile , "%c¥r",  '¥'' ) ; 
  5234.       } 
  5235.     } 
  5236.     break ; 
  5237.   case 4 : 
  5238.     {
  5239.       (void) FPrintF( logfile , "%s¥r",  "a bad literal--popped from an empty stack" ) ; 
  5240.     } 
  5241.     break ; 
  5242.     default: 
  5243.     unknwnliteralconfusi () ; 
  5244.     break ; 
  5245.   } 
  5246. #endif /* TRACE */
  5247.   if ( ( litstkptr == litstksize ) ) 
  5248.   {
  5249.     printoverflow () ; 
  5250.     {
  5251.       (void) FPrintF( logfile , "%s%ld¥r",  "literal-stack size " , (long)litstksize ) ; 
  5252.       (void) FPrintFStdErr( "%s%ld¥r",  "literal-stack size " , (long)litstksize ) ; 
  5253.     } 
  5254.     longjmp(jmp9998,1) ; 
  5255.   } 
  5256.   incr ( litstkptr ) ; 
  5257. void
  5258. #ifdef STDC
  5259. zpoplitstk (integer * poplit ,stktype * poptype ) 
  5260. #else
  5261. zpoplitstk ( poplit , poptype ) 
  5262. integer * poplit ; 
  5263. stktype * poptype ; 
  5264. #endif
  5265. {if ( ( litstkptr == 0 ) ) 
  5266.   {
  5267.     {
  5268.       {
  5269.     (void) ReverseFPuts( logfile ,  "You can't pop an empty literal stack" ) ; 
  5270.     (void) FPrintFStdErr(  "You can't pop an empty literal stack" ) ; 
  5271.       } 
  5272.       bstexwarnprint () ; 
  5273.     } 
  5274. *    poptype = 4 ; 
  5275.   } 
  5276.   else {
  5277.       
  5278.     decr ( litstkptr ) ; 
  5279. *    poplit = litstack [ litstkptr ] ; 
  5280. *    poptype = litstktype [ litstkptr ] ; 
  5281.     if ( ( *poptype == 1 ) ) 
  5282.     if ( ( *poplit >= cmdstrptr ) ) 
  5283.     {
  5284.       if ( ( *poplit != strptr - 1 ) ) 
  5285.       {
  5286.     {
  5287.       (void) ReverseFPuts( logfile ,  "Nontop top of string stack" ) ; 
  5288.       (void) FPrintFStdErr(  "Nontop top of string stack" ) ; 
  5289.     } 
  5290.     printconfusion () ; 
  5291.     longjmp(jmp9998,1) ; 
  5292.       } 
  5293.       {
  5294.     decr ( strptr ) ; 
  5295.     poolptr = strstart [ strptr ] ; 
  5296.       } 
  5297.     } 
  5298.   } 
  5299. void
  5300. #ifdef STDC
  5301. zprintwrongstklit (integer stklt ,stktype stktp1 ,stktype stktp2 ) 
  5302. #else
  5303. zprintwrongstklit ( stklt , stktp1 , stktp2 ) 
  5304. integer stklt ; 
  5305. stktype stktp1 , stktp2 ; 
  5306. #endif
  5307. {if ( ( stktp1 != 4 ) ) 
  5308.   {
  5309.     printstklit ( stklt , stktp1 ) ; 
  5310.     switch ( ( stktp2 ) ) 
  5311.     {case 0 : 
  5312.       {
  5313.     (void) ReverseFPuts( logfile ,  ", not an integer," ) ; 
  5314.     (void) FPrintFStdErr(  ", not an integer," ) ; 
  5315.       } 
  5316.       break ; 
  5317.     case 1 : 
  5318.       {
  5319.     (void) ReverseFPuts( logfile ,  ", not a string," ) ; 
  5320.     (void) FPrintFStdErr(  ", not a string," ) ; 
  5321.       } 
  5322.       break ; 
  5323.     case 2 : 
  5324.       {
  5325.     (void) ReverseFPuts( logfile ,  ", not a function," ) ; 
  5326.     (void) FPrintFStdErr(  ", not a function," ) ; 
  5327.       } 
  5328.       break ; 
  5329.     case 3 : 
  5330.     case 4 : 
  5331.       illeglliteralconfusi () ; 
  5332.       break ; 
  5333.       default: 
  5334.       unknwnliteralconfusi () ; 
  5335.       break ; 
  5336.     } 
  5337.     bstexwarnprint () ; 
  5338.   } 
  5339. void poptopandprint (void) {
  5340.     integer stklt  ; 
  5341.   stktype stktp  ; 
  5342.   poplitstk ( stklt , stktp ) ; 
  5343.   if ( ( stktp == 4 ) ) 
  5344.   {
  5345.     (void) FPrintF( logfile , "%s¥r",  "Empty literal" ) ; 
  5346.     (void) FPrintFStdErr( "%s¥r",  "Empty literal" ) ; 
  5347.   } 
  5348.   else printlit ( stklt , stktp ) ; 
  5349. }
  5350.  
  5351. void popwholestack (void) {
  5352.     while ( ( litstkptr > 0 ) ) poptopandprint () ; 
  5353.  
  5354. }
  5355. void initcommandexecution (void) {
  5356.     litstkptr = 0 ; 
  5357.   cmdstrptr = strptr ; 
  5358.  
  5359. }
  5360. void checkcommandexecutio (void) {
  5361.     if ( ( litstkptr != 0 ) ) 
  5362.   {
  5363.     {
  5364.       (void) FPrintF( logfile , "%s%ld%s¥r",  "ptr=" , (long)litstkptr , ", stack=" ) ; 
  5365.       (void) FPrintFStdErr( "%s%ld%s¥r",  "ptr=" , (long)litstkptr , ", stack=" ) ; 
  5366.     } 
  5367.     popwholestack () ; 
  5368.     {
  5369.       {
  5370.     (void) ReverseFPuts( logfile ,  "---the literal stack isn't empty" ) ; 
  5371.     (void) FPrintFStdErr(  "---the literal stack isn't empty" ) ; 
  5372.       } 
  5373.       bstexwarnprint () ; 
  5374.     } 
  5375.   } 
  5376.   if ( ( cmdstrptr != strptr ) ) 
  5377.   {
  5378.     ;
  5379. #ifdef TRACE
  5380.     {
  5381.       (void) FPrintF( logfile , "%s%ld%s%ld¥r",  "Pointer is " , (long)strptr , " but should be " ,       (long)cmdstrptr ) ; 
  5382.       (void) FPrintFStdErr( "%s%ld%s%ld¥r",  "Pointer is " , (long)strptr , " but should be " ,       (long)cmdstrptr ) ; 
  5383.     } 
  5384. #endif /* TRACE */
  5385.     {
  5386.       {
  5387.     (void) ReverseFPuts( logfile ,  "Nonempty empty string stack" ) ; 
  5388.     (void) FPrintFStdErr(  "Nonempty empty string stack" ) ; 
  5389.       } 
  5390.       printconfusion () ; 
  5391.       longjmp(jmp9998,1) ; 
  5392.     } 
  5393.   } 
  5394. }
  5395.  
  5396. void addpoolbufandpush (void) {
  5397.     { 
  5398.     if ( ( poolptr + exbuflength > poolsize ) ) 
  5399.     pooloverflow () ; 
  5400.   } 
  5401.   exbufptr = 0 ; 
  5402.   while ( ( exbufptr < exbuflength ) ) {
  5403.       
  5404.     {
  5405.       strpool [ poolptr ] = exbuf [ exbufptr ] ; 
  5406.       incr ( poolptr ) ; 
  5407.     } 
  5408.     incr ( exbufptr ) ; 
  5409.   } 
  5410.   pushlitstk ( makestring () , 1 ) ; 
  5411. void
  5412. #ifdef STDC
  5413. zaddbufpool (strnumber pstr ) 
  5414. #else
  5415. zaddbufpool ( pstr ) 
  5416. strnumber pstr ; 
  5417. #endif
  5418. {pptr1 = strstart [ pstr ] ; 
  5419.   pptr2 = strstart [ pstr + 1 ] ; 
  5420.   if ( ( exbuflength + ( pptr2 - pptr1 ) > bufsize ) ) 
  5421.   bufferoverflow () ; 
  5422.   exbufptr = exbuflength ; 
  5423.   while ( ( pptr1 < pptr2 ) ) {
  5424.       
  5425.     {
  5426.       exbuf [ exbufptr ] = strpool [ pptr1 ] ; 
  5427.       incr ( exbufptr ) ; 
  5428.     } 
  5429.     incr ( pptr1 ) ; 
  5430.   } 
  5431.   exbuflength = exbufptr ; 
  5432. void
  5433. #ifdef STDC
  5434. zaddoutpool (strnumber pstr ) 
  5435. #else
  5436. zaddoutpool ( pstr ) 
  5437. strnumber pstr ; 
  5438. #endif
  5439. {bufpointer breakptr  ; 
  5440.   bufpointer endptr  ; 
  5441.   pptr1 = strstart [ pstr ] ; 
  5442.   pptr2 = strstart [ pstr + 1 ] ; 
  5443.   if ( ( outbuflength + ( pptr2 - pptr1 ) > bufsize ) ) 
  5444.   {
  5445.     printoverflow () ; 
  5446.     {
  5447.       (void) FPrintF( logfile , "%s%ld¥r",  "output buffer size " , (long)bufsize ) ; 
  5448.       (void) FPrintFStdErr( "%s%ld¥r",  "output buffer size " , (long)bufsize ) ; 
  5449.     } 
  5450.     longjmp(jmp9998,1) ; 
  5451.   } 
  5452.   outbufptr = outbuflength ; 
  5453.   while ( ( pptr1 < pptr2 ) ) {
  5454.       
  5455.     outbuf [ outbufptr ] = strpool [ pptr1 ] ; 
  5456.     incr ( pptr1 ) ; 
  5457.     incr ( outbufptr ) ; 
  5458.   } 
  5459.   outbuflength = outbufptr ; 
  5460.   while ( ( outbuflength > maxprintline ) ) {
  5461.       
  5462.     endptr = outbuflength ; 
  5463.     outbufptr = maxprintline ; 
  5464.     while ( ( ( lexclass [ outbuf [ outbufptr ] ] != 1 ) && ( outbufptr >= 
  5465.     minprintline ) ) ) decr ( outbufptr ) ; 
  5466.     if ( ( outbufptr == minprintline - 1 ) ) 
  5467.     {
  5468.       outbuf [ endptr ] = outbuf [ maxprintline - 1 ] ; 
  5469.       outbuf [ maxprintline - 1 ] = 37 ; 
  5470.       outbuflength = maxprintline ; 
  5471.       breakptr = outbuflength - 1 ; 
  5472.       outputbblline () ; 
  5473.       outbuf [ maxprintline - 1 ] = outbuf [ endptr ] ; 
  5474.       outbufptr = 0 ; 
  5475.       tmpptr = breakptr ; 
  5476.       while ( ( tmpptr < endptr ) ) {
  5477.       
  5478.     outbuf [ outbufptr ] = outbuf [ tmpptr ] ; 
  5479.     incr ( outbufptr ) ; 
  5480.     incr ( tmpptr ) ; 
  5481.       } 
  5482.       outbuflength = endptr - breakptr ; 
  5483.     } 
  5484.     else {
  5485.     
  5486.       outbuflength = outbufptr ; 
  5487.       breakptr = outbuflength + 1 ; 
  5488.       outputbblline () ; 
  5489.       outbuf [ 0 ] = 32 ; 
  5490.       outbuf [ 1 ] = 32 ; 
  5491.       outbufptr = 2 ; 
  5492.       tmpptr = breakptr ; 
  5493.       while ( ( tmpptr < endptr ) ) {
  5494.       
  5495.     outbuf [ outbufptr ] = outbuf [ tmpptr ] ; 
  5496.     incr ( outbufptr ) ; 
  5497.     incr ( tmpptr ) ; 
  5498.       } 
  5499.       outbuflength = endptr - breakptr + 2 ; 
  5500.     } 
  5501.   } 
  5502. }
  5503.  
  5504. void xequals (void) {
  5505.     poplitstk ( poplit1 , poptyp1 ) ; 
  5506.   poplitstk ( poplit2 , poptyp2 ) ; 
  5507.   if ( ( poptyp1 != poptyp2 ) ) 
  5508.   {
  5509.     if ( ( ( poptyp1 != 4 ) && ( poptyp2 != 4 ) ) ) 
  5510.     {
  5511.       printstklit ( poplit1 , poptyp1 ) ; 
  5512.       {
  5513.     (void) ReverseFPuts( logfile ,  ", " ) ; 
  5514.     (void) FPrintFStdErr(  ", " ) ; 
  5515.       } 
  5516.       printstklit ( poplit2 , poptyp2 ) ; 
  5517.       printanewline () ; 
  5518.       {
  5519.     {
  5520.       (void) ReverseFPuts( logfile ,  "---they aren't the same literal types" ) ; 
  5521.       (void) FPrintFStdErr(  "---they aren't the same literal types" ) ; 
  5522.     } 
  5523.     bstexwarnprint () ; 
  5524.       } 
  5525.     } 
  5526.     pushlitstk ( 0 , 0 ) ; 
  5527.   } 
  5528.   else if ( ( ( poptyp1 != 0 ) && ( poptyp1 != 1 ) ) ) 
  5529.   {
  5530.     if ( ( poptyp1 != 4 ) ) 
  5531.     {
  5532.       printstklit ( poplit1 , poptyp1 ) ; 
  5533.       {
  5534.     {
  5535.       (void) ReverseFPuts( logfile ,  ", not an integer or a string," ) ; 
  5536.       (void) FPrintFStdErr(  ", not an integer or a string," ) ; 
  5537.     } 
  5538.     bstexwarnprint () ; 
  5539.       } 
  5540.     } 
  5541.     pushlitstk ( 0 , 0 ) ; 
  5542.   } 
  5543.   else if ( ( poptyp1 == 0 ) ) 
  5544.   if ( ( poplit2 == poplit1 ) ) 
  5545.   pushlitstk ( 1 , 0 ) ; 
  5546.   else pushlitstk ( 0 , 0 ) ; 
  5547.   else if ( ( streqstr ( poplit2 , poplit1 ) ) ) 
  5548.   pushlitstk ( 1 , 0 ) ; 
  5549.   else pushlitstk ( 0 , 0 ) ; 
  5550.  
  5551. }
  5552. void xgreaterthan (void) {
  5553.     poplitstk ( poplit1 , poptyp1 ) ; 
  5554.   poplitstk ( poplit2 , poptyp2 ) ; 
  5555.   if ( ( poptyp1 != 0 ) ) 
  5556.   {
  5557.     printwrongstklit ( poplit1 , poptyp1 , 0 ) ; 
  5558.     pushlitstk ( 0 , 0 ) ; 
  5559.   } 
  5560.   else if ( ( poptyp2 != 0 ) ) 
  5561.   {
  5562.     printwrongstklit ( poplit2 , poptyp2 , 0 ) ; 
  5563.     pushlitstk ( 0 , 0 ) ; 
  5564.   } 
  5565.   else if ( ( poplit2 > poplit1 ) ) 
  5566.   pushlitstk ( 1 , 0 ) ; 
  5567.   else pushlitstk ( 0 , 0 ) ; 
  5568.  
  5569. }
  5570. void xlessthan (void) {
  5571.     poplitstk ( poplit1 , poptyp1 ) ; 
  5572.   poplitstk ( poplit2 , poptyp2 ) ; 
  5573.   if ( ( poptyp1 != 0 ) ) 
  5574.   {
  5575.     printwrongstklit ( poplit1 , poptyp1 , 0 ) ; 
  5576.     pushlitstk ( 0 , 0 ) ; 
  5577.   } 
  5578.   else if ( ( poptyp2 != 0 ) ) 
  5579.   {
  5580.     printwrongstklit ( poplit2 , poptyp2 , 0 ) ; 
  5581.     pushlitstk ( 0 , 0 ) ; 
  5582.   } 
  5583.   else if ( ( poplit2 < poplit1 ) ) 
  5584.   pushlitstk ( 1 , 0 ) ; 
  5585.   else pushlitstk ( 0 , 0 ) ; 
  5586.  
  5587. }
  5588. void xplus (void) {
  5589.     poplitstk ( poplit1 , poptyp1 ) ; 
  5590.   poplitstk ( poplit2 , poptyp2 ) ; 
  5591.   if ( ( poptyp1 != 0 ) ) 
  5592.   {
  5593.     printwrongstklit ( poplit1 , poptyp1 , 0 ) ; 
  5594.     pushlitstk ( 0 , 0 ) ; 
  5595.   } 
  5596.   else if ( ( poptyp2 != 0 ) ) 
  5597.   {
  5598.     printwrongstklit ( poplit2 , poptyp2 , 0 ) ; 
  5599.     pushlitstk ( 0 , 0 ) ; 
  5600.   } 
  5601.   else pushlitstk ( poplit2 + poplit1 , 0 ) ; 
  5602.  
  5603. }
  5604. void xminus (void) {
  5605.     poplitstk ( poplit1 , poptyp1 ) ; 
  5606.   poplitstk ( poplit2 , poptyp2 ) ; 
  5607.   if ( ( poptyp1 != 0 ) ) 
  5608.   {
  5609.     printwrongstklit ( poplit1 , poptyp1 , 0 ) ; 
  5610.     pushlitstk ( 0 , 0 ) ; 
  5611.   } 
  5612.   else if ( ( poptyp2 != 0 ) ) 
  5613.   {
  5614.     printwrongstklit ( poplit2 , poptyp2 , 0 ) ; 
  5615.     pushlitstk ( 0 , 0 ) ; 
  5616.   } 
  5617.   else pushlitstk ( poplit2 - poplit1 , 0 ) ; 
  5618.  
  5619. }
  5620. void xconcatenate (void) {
  5621.     poplitstk ( poplit1 , poptyp1 ) ; 
  5622.   poplitstk ( poplit2 , poptyp2 ) ; 
  5623.   if ( ( poptyp1 != 1 ) ) 
  5624.   {
  5625.     printwrongstklit ( poplit1 , poptyp1 , 1 ) ; 
  5626.     pushlitstk ( snull , 1 ) ; 
  5627.   } 
  5628.   else if ( ( poptyp2 != 1 ) ) 
  5629.   {
  5630.     printwrongstklit ( poplit2 , poptyp2 , 1 ) ; 
  5631.     pushlitstk ( snull , 1 ) ; 
  5632.   } 
  5633.   else {
  5634.       
  5635.     if ( ( poplit2 >= cmdstrptr ) ) 
  5636.     if ( ( poplit1 >= cmdstrptr ) ) 
  5637.     {
  5638.       strstart [ poplit1 ] = strstart [ poplit1 + 1 ] ; 
  5639.       {
  5640.     incr ( strptr ) ; 
  5641.     poolptr = strstart [ strptr ] ; 
  5642.       } 
  5643.       incr ( litstkptr ) ; 
  5644.     } 
  5645.     else if ( ( ( strstart [ poplit2 + 1 ] - strstart [ poplit2 ] ) == 0 ) ) 
  5646.     pushlitstk ( poplit1 , 1 ) ; 
  5647.     else {
  5648.     
  5649.       poolptr = strstart [ poplit2 + 1 ] ; 
  5650.       {
  5651.     if ( ( poolptr + ( strstart [ poplit1 + 1 ] - strstart [ poplit1 ] ) > 
  5652.     poolsize ) ) 
  5653.     pooloverflow () ; 
  5654.       } 
  5655.       spptr = strstart [ poplit1 ] ; 
  5656.       spend = strstart [ poplit1 + 1 ] ; 
  5657.       while ( ( spptr < spend ) ) {
  5658.       
  5659.     {
  5660.       strpool [ poolptr ] = strpool [ spptr ] ; 
  5661.       incr ( poolptr ) ; 
  5662.     } 
  5663.     incr ( spptr ) ; 
  5664.       } 
  5665.       pushlitstk ( makestring () , 1 ) ; 
  5666.     } 
  5667.     else {
  5668.     
  5669.       if ( ( poplit1 >= cmdstrptr ) ) 
  5670.       if ( ( ( strstart [ poplit2 + 1 ] - strstart [ poplit2 ] ) == 0 ) ) 
  5671.       {
  5672.     {
  5673.       incr ( strptr ) ; 
  5674.       poolptr = strstart [ strptr ] ; 
  5675.     } 
  5676.     litstack [ litstkptr ] = poplit1 ; 
  5677.     incr ( litstkptr ) ; 
  5678.       } 
  5679.       else if ( ( ( strstart [ poplit1 + 1 ] - strstart [ poplit1 ] ) == 0 ) ) 
  5680.       incr ( litstkptr ) ; 
  5681.       else {
  5682.       
  5683.     splength = ( strstart [ poplit1 + 1 ] - strstart [ poplit1 ] ) ; 
  5684.     sp2length = ( strstart [ poplit2 + 1 ] - strstart [ poplit2 ] ) ; 
  5685.     {
  5686.       if ( ( poolptr + splength + sp2length > poolsize ) ) 
  5687.       pooloverflow () ; 
  5688.     } 
  5689.     spptr = strstart [ poplit1 + 1 ] ; 
  5690.     spend = strstart [ poplit1 ] ; 
  5691.     spxptr1 = spptr + sp2length ; 
  5692.     while ( ( spptr > spend ) ) {
  5693.         
  5694.       decr ( spptr ) ; 
  5695.       decr ( spxptr1 ) ; 
  5696.       strpool [ spxptr1 ] = strpool [ spptr ] ; 
  5697.     } 
  5698.     spptr = strstart [ poplit2 ] ; 
  5699.     spend = strstart [ poplit2 + 1 ] ; 
  5700.     while ( ( spptr < spend ) ) {
  5701.         
  5702.       {
  5703.         strpool [ poolptr ] = strpool [ spptr ] ; 
  5704.         incr ( poolptr ) ; 
  5705.       } 
  5706.       incr ( spptr ) ; 
  5707.     } 
  5708.     poolptr = poolptr + splength ; 
  5709.     pushlitstk ( makestring () , 1 ) ; 
  5710.       } 
  5711.       else {
  5712.       
  5713.     if ( ( ( strstart [ poplit1 + 1 ] - strstart [ poplit1 ] ) == 0 ) ) 
  5714.     incr ( litstkptr ) ; 
  5715.     else if ( ( ( strstart [ poplit2 + 1 ] - strstart [ poplit2 ] ) == 0 ) 
  5716.     ) 
  5717.     pushlitstk ( poplit1 , 1 ) ; 
  5718.     else {
  5719.         
  5720.       {
  5721.         if ( ( poolptr + ( strstart [ poplit1 + 1 ] - strstart [ poplit1 ] 
  5722.         ) + ( strstart [ poplit2 + 1 ] - strstart [ poplit2 ] ) > poolsize 
  5723.         ) ) 
  5724.         pooloverflow () ; 
  5725.       } 
  5726.       spptr = strstart [ poplit2 ] ; 
  5727.       spend = strstart [ poplit2 + 1 ] ; 
  5728.       while ( ( spptr < spend ) ) {
  5729.           
  5730.         {
  5731.           strpool [ poolptr ] = strpool [ spptr ] ; 
  5732.           incr ( poolptr ) ; 
  5733.         } 
  5734.         incr ( spptr ) ; 
  5735.       } 
  5736.       spptr = strstart [ poplit1 ] ; 
  5737.       spend = strstart [ poplit1 + 1 ] ; 
  5738.       while ( ( spptr < spend ) ) {
  5739.           
  5740.         {
  5741.           strpool [ poolptr ] = strpool [ spptr ] ; 
  5742.           incr ( poolptr ) ; 
  5743.         } 
  5744.         incr ( spptr ) ; 
  5745.       } 
  5746.       pushlitstk ( makestring () , 1 ) ; 
  5747.     } 
  5748.       } 
  5749.     } 
  5750.   } 
  5751.  
  5752. }
  5753. void xgets (void) {
  5754.     poplitstk ( poplit1 , poptyp1 ) ; 
  5755.   poplitstk ( poplit2 , poptyp2 ) ; 
  5756.   if ( ( poptyp1 != 2 ) ) 
  5757.   printwrongstklit ( poplit1 , poptyp1 , 2 ) ; 
  5758.   else if ( ( ( ! messwithentries ) && ( ( fntype [ poplit1 ] == 6 ) || ( 
  5759.   fntype [ poplit1 ] == 5 ) ) ) ) 
  5760.   bstcantmesswithentri () ; 
  5761.   else switch ( ( fntype [ poplit1 ] ) ) 
  5762.   {case 5 : 
  5763.     if ( ( poptyp2 != 0 ) ) 
  5764.     printwrongstklit ( poplit2 , poptyp2 , 0 ) ; 
  5765.     else entryints [ citeptr * numentints + ilkinfo [ poplit1 ] ] = poplit2 ; 
  5766.     break ; 
  5767.   case 6 : 
  5768.     {
  5769.       if ( ( poptyp2 != 1 ) ) 
  5770.       printwrongstklit ( poplit2 , poptyp2 , 1 ) ; 
  5771.       else {
  5772.       
  5773.     strentptr = citeptr * numentstrs + ilkinfo [ poplit1 ] ; 
  5774.     entchrptr = 0 ; 
  5775.     spptr = strstart [ poplit2 ] ; 
  5776.     spxptr1 = strstart [ poplit2 + 1 ] ; 
  5777.     if ( ( spxptr1 - spptr > entstrsize ) ) 
  5778.     {
  5779.       {
  5780.         bst1printstringsizee () ; 
  5781.         {
  5782.           (void) FPrintF( logfile , "%ld%s",  (long)entstrsize , ", the entry" ) ; 
  5783.           (void) FPrintFStdErr( "%ld%s",  (long)entstrsize , ", the entry" ) ; 
  5784.         } 
  5785.         bst2printstringsizee () ; 
  5786.       } 
  5787.       spxptr1 = spptr + entstrsize ; 
  5788.     } 
  5789.     while ( ( spptr < spxptr1 ) ) {
  5790.         
  5791.       entrystrs [ strentptr ] [ entchrptr ] = strpool [ spptr ] ; 
  5792.       incr ( entchrptr ) ; 
  5793.       incr ( spptr ) ; 
  5794.     } 
  5795.     entrystrs [ strentptr ] [ entchrptr ] = 127 ; 
  5796.       } 
  5797.     } 
  5798.     break ; 
  5799.   case 7 : 
  5800.     if ( ( poptyp2 != 0 ) ) 
  5801.     printwrongstklit ( poplit2 , poptyp2 , 0 ) ; 
  5802.     else ilkinfo [ poplit1 ] = poplit2 ; 
  5803.     break ; 
  5804.   case 8 : 
  5805.     {
  5806.       if ( ( poptyp2 != 1 ) ) 
  5807.       printwrongstklit ( poplit2 , poptyp2 , 1 ) ; 
  5808.       else {
  5809.       
  5810.     strglbptr = ilkinfo [ poplit1 ] ; 
  5811.     if ( ( poplit2 < cmdstrptr ) ) 
  5812.     glbstrptr [ strglbptr ] = poplit2 ; 
  5813.     else {
  5814.         
  5815.       glbstrptr [ strglbptr ] = 0 ; 
  5816.       globchrptr = 0 ; 
  5817.       spptr = strstart [ poplit2 ] ; 
  5818.       spend = strstart [ poplit2 + 1 ] ; 
  5819.       if ( ( spend - spptr > globstrsize ) ) 
  5820.       {
  5821.         {
  5822.           bst1printstringsizee () ; 
  5823.           {
  5824.         (void) FPrintF( logfile , "%ld%s",  (long)globstrsize , ", the global" ) ; 
  5825.         (void) FPrintFStdErr( "%ld%s",  (long)globstrsize , ", the global" ) ; 
  5826.           } 
  5827.           bst2printstringsizee () ; 
  5828.         } 
  5829.         spend = spptr + globstrsize ; 
  5830.       } 
  5831.       while ( ( spptr < spend ) ) {
  5832.           
  5833.         globalstrs [ strglbptr ] [ globchrptr ] = strpool [ spptr ] ; 
  5834.         incr ( globchrptr ) ; 
  5835.         incr ( spptr ) ; 
  5836.       } 
  5837.       glbstrend [ strglbptr ] = globchrptr ; 
  5838.     } 
  5839.       } 
  5840.     } 
  5841.     break ; 
  5842.     default: 
  5843.     {
  5844.       {
  5845.     (void) ReverseFPuts( logfile ,  "You can't assign to type " ) ; 
  5846.     (void) FPrintFStdErr(  "You can't assign to type " ) ; 
  5847.       } 
  5848.       printfnclass ( poplit1 ) ; 
  5849.       {
  5850.     {
  5851.       (void) ReverseFPuts( logfile ,  ", a nonvariable function class" ) ; 
  5852.       (void) FPrintFStdErr(  ", a nonvariable function class" ) ; 
  5853.     } 
  5854.     bstexwarnprint () ; 
  5855.       } 
  5856.     } 
  5857.     break ; 
  5858.   } 
  5859.  
  5860. }
  5861. void xaddperiod (void) {
  5862.     /* 15 */ poplitstk ( poplit1 , poptyp1 ) ; 
  5863.   if ( ( poptyp1 != 1 ) ) 
  5864.   {
  5865.     printwrongstklit ( poplit1 , poptyp1 , 1 ) ; 
  5866.     pushlitstk ( snull , 1 ) ; 
  5867.   } 
  5868.   else if ( ( ( strstart [ poplit1 + 1 ] - strstart [ poplit1 ] ) == 0 ) ) 
  5869.   pushlitstk ( snull , 1 ) ; 
  5870.   else {
  5871.       
  5872.     spptr = strstart [ poplit1 + 1 ] ; 
  5873.     spend = strstart [ poplit1 ] ; 
  5874.     while ( ( spptr > spend ) ) {
  5875.     
  5876.       decr ( spptr ) ; 
  5877.       if ( ( strpool [ spptr ] != 125 ) ) 
  5878.       goto lab15 ; 
  5879.     } 
  5880.     lab15: switch ( ( strpool [ spptr ] ) ) 
  5881.     {case 46 : 
  5882.     case 63 : 
  5883.     case 33 : 
  5884.       {
  5885.     if ( ( litstack [ litstkptr ] >= cmdstrptr ) ) 
  5886.     {
  5887.       incr ( strptr ) ; 
  5888.       poolptr = strstart [ strptr ] ; 
  5889.     } 
  5890.     incr ( litstkptr ) ; 
  5891.       } 
  5892.       break ; 
  5893.       default: 
  5894.       {
  5895.     if ( ( poplit1 < cmdstrptr ) ) 
  5896.     {
  5897.       {
  5898.         if ( ( poolptr + ( strstart [ poplit1 + 1 ] - strstart [ poplit1 ] 
  5899.         ) + 1 > poolsize ) ) 
  5900.         pooloverflow () ; 
  5901.       } 
  5902.       spptr = strstart [ poplit1 ] ; 
  5903.       spend = strstart [ poplit1 + 1 ] ; 
  5904.       while ( ( spptr < spend ) ) {
  5905.           
  5906.         {
  5907.           strpool [ poolptr ] = strpool [ spptr ] ; 
  5908.           incr ( poolptr ) ; 
  5909.         } 
  5910.         incr ( spptr ) ; 
  5911.       } 
  5912.     } 
  5913.     else {
  5914.         
  5915.       poolptr = strstart [ poplit1 + 1 ] ; 
  5916.       {
  5917.         if ( ( poolptr + 1 > poolsize ) ) 
  5918.         pooloverflow () ; 
  5919.       } 
  5920.     } 
  5921.     {
  5922.       strpool [ poolptr ] = 46 ; 
  5923.       incr ( poolptr ) ; 
  5924.     } 
  5925.     pushlitstk ( makestring () , 1 ) ; 
  5926.       } 
  5927.       break ; 
  5928.     } 
  5929.   } 
  5930.  
  5931. }
  5932. void xchangecase (void) {
  5933.     /* 21 */ poplitstk ( poplit1 , poptyp1 ) ; 
  5934.   poplitstk ( poplit2 , poptyp2 ) ; 
  5935.   if ( ( poptyp1 != 1 ) ) 
  5936.   {
  5937.     printwrongstklit ( poplit1 , poptyp1 , 1 ) ; 
  5938.     pushlitstk ( snull , 1 ) ; 
  5939.   } 
  5940.   else if ( ( poptyp2 != 1 ) ) 
  5941.   {
  5942.     printwrongstklit ( poplit2 , poptyp2 , 1 ) ; 
  5943.     pushlitstk ( snull , 1 ) ; 
  5944.   } 
  5945.   else {
  5946.       
  5947.     {
  5948.       switch ( ( strpool [ strstart [ poplit1 ] ] ) ) 
  5949.       {case 116 : 
  5950.       case 84 : 
  5951.     conversiontype = 0 ; 
  5952.     break ; 
  5953.       case 108 : 
  5954.       case 76 : 
  5955.     conversiontype = 1 ; 
  5956.     break ; 
  5957.       case 117 : 
  5958.       case 85 : 
  5959.     conversiontype = 2 ; 
  5960.     break ; 
  5961.     default: 
  5962.     conversiontype = 3 ; 
  5963.     break ; 
  5964.       } 
  5965.       if ( ( ( ( strstart [ poplit1 + 1 ] - strstart [ poplit1 ] ) != 1 ) || ( 
  5966.       conversiontype == 3 ) ) ) 
  5967.       {
  5968.     conversiontype = 3 ; 
  5969.     printapoolstr ( poplit1 ) ; 
  5970.     {
  5971.       {
  5972.         (void) ReverseFPuts( logfile ,  " is an illegal case-conversion string" ) ; 
  5973.         (void) FPrintFStdErr(  " is an illegal case-conversion string" ) ; 
  5974.       } 
  5975.       bstexwarnprint () ; 
  5976.     } 
  5977.       } 
  5978.     } 
  5979.     exbuflength = 0 ; 
  5980.     addbufpool ( poplit2 ) ; 
  5981.     {
  5982.       bracelevel = 0 ; 
  5983.       exbufptr = 0 ; 
  5984.       while ( ( exbufptr < exbuflength ) ) {
  5985.       
  5986.     if ( ( exbuf [ exbufptr ] == 123 ) ) 
  5987.     {
  5988.       incr ( bracelevel ) ; 
  5989.       if ( ( bracelevel != 1 ) ) 
  5990.       goto lab21 ; 
  5991.       if ( ( exbufptr + 4 > exbuflength ) ) 
  5992.       goto lab21 ; 
  5993.       else if ( ( exbuf [ exbufptr + 1 ] != 92 ) ) 
  5994.       goto lab21 ; 
  5995.       if ( ( conversiontype == 0 ) ) 
  5996.       if ( ( exbufptr == 0 ) ) 
  5997.       goto lab21 ; 
  5998.       else if ( ( ( prevcolon ) && ( lexclass [ exbuf [ exbufptr - 1 ] ] 
  5999.       == 1 ) ) ) 
  6000.       goto lab21 ; 
  6001.       {
  6002.         incr ( exbufptr ) ; 
  6003.         while ( ( ( exbufptr < exbuflength ) && ( bracelevel > 0 ) ) ) {
  6004.         
  6005.           incr ( exbufptr ) ; 
  6006.           exbufxptr = exbufptr ; 
  6007.           while ( ( ( exbufptr < exbuflength ) && ( lexclass [ exbuf [ 
  6008.           exbufptr ] ] == 2 ) ) ) incr ( exbufptr ) ; 
  6009.           controlseqloc = strlookup ( exbuf , exbufxptr , exbufptr - 
  6010.           exbufxptr , 14 , false ) ; 
  6011.           if ( ( hashfound ) ) 
  6012.           {
  6013.         switch ( ( conversiontype ) ) 
  6014.         {case 0 : 
  6015.         case 1 : 
  6016.           switch ( ( ilkinfo [ controlseqloc ] ) ) 
  6017.           {case 11 : 
  6018.           case 9 : 
  6019.           case 3 : 
  6020.           case 5 : 
  6021.           case 7 : 
  6022.             lowercase ( exbuf , exbufxptr , exbufptr - exbufxptr ) ; 
  6023.             break ; 
  6024.             default: 
  6025.             ; 
  6026.             break ; 
  6027.           } 
  6028.           break ; 
  6029.         case 2 : 
  6030.           switch ( ( ilkinfo [ controlseqloc ] ) ) 
  6031.           {case 10 : 
  6032.           case 8 : 
  6033.           case 2 : 
  6034.           case 4 : 
  6035.           case 6 : 
  6036.             uppercase ( exbuf , exbufxptr , exbufptr - exbufxptr ) ; 
  6037.             break ; 
  6038.           case 0 : 
  6039.           case 1 : 
  6040.           case 12 : 
  6041.             {
  6042.               uppercase ( exbuf , exbufxptr , exbufptr - exbufxptr ) ; 
  6043.               while ( ( exbufxptr < exbufptr ) ) {
  6044.               
  6045.             exbuf [ exbufxptr - 1 ] = exbuf [ exbufxptr ] ; 
  6046.             incr ( exbufxptr ) ; 
  6047.               } 
  6048.               decr ( exbufxptr ) ; 
  6049.               while ( ( ( exbufptr < exbuflength ) && ( lexclass [ 
  6050.               exbuf [ exbufptr ] ] == 1 ) ) ) incr ( exbufptr ) ; 
  6051.               tmpptr = exbufptr ; 
  6052.               while ( ( tmpptr < exbuflength ) ) {
  6053.               
  6054.             exbuf [ tmpptr - ( exbufptr - exbufxptr ) ] = exbuf [ 
  6055.             tmpptr ] ; 
  6056.             incr ( tmpptr ) ; 
  6057.               } 
  6058.               exbuflength = tmpptr - ( exbufptr - exbufxptr ) ; 
  6059.               exbufptr = exbufxptr ; 
  6060.             } 
  6061.             break ; 
  6062.             default: 
  6063.             ; 
  6064.             break ; 
  6065.           } 
  6066.           break ; 
  6067.         case 3 : 
  6068.           ; 
  6069.           break ; 
  6070.           default: 
  6071.           caseconversionconfus () ; 
  6072.           break ; 
  6073.         } 
  6074.           } 
  6075.           exbufxptr = exbufptr ; 
  6076.           while ( ( ( exbufptr < exbuflength ) && ( bracelevel > 0 ) && ( 
  6077.           exbuf [ exbufptr ] != 92 ) ) ) {
  6078.           
  6079.         if ( ( exbuf [ exbufptr ] == 125 ) ) 
  6080.         decr ( bracelevel ) ; 
  6081.         else if ( ( exbuf [ exbufptr ] == 123 ) ) 
  6082.         incr ( bracelevel ) ; 
  6083.         incr ( exbufptr ) ; 
  6084.           } 
  6085.           {
  6086.         switch ( ( conversiontype ) ) 
  6087.         {case 0 : 
  6088.         case 1 : 
  6089.           lowercase ( exbuf , exbufxptr , exbufptr - exbufxptr ) ; 
  6090.           break ; 
  6091.         case 2 : 
  6092.           uppercase ( exbuf , exbufxptr , exbufptr - exbufxptr ) ; 
  6093.           break ; 
  6094.         case 3 : 
  6095.           ; 
  6096.           break ; 
  6097.           default: 
  6098.           caseconversionconfus () ; 
  6099.           break ; 
  6100.         } 
  6101.           } 
  6102.         } 
  6103.         decr ( exbufptr ) ; 
  6104.       } 
  6105.       lab21: prevcolon = false ; 
  6106.     } 
  6107.     else if ( ( exbuf [ exbufptr ] == 125 ) ) 
  6108.     {
  6109.       decrbracelevel ( poplit2 ) ; 
  6110.       prevcolon = false ; 
  6111.     } 
  6112.     else if ( ( bracelevel == 0 ) ) 
  6113.     {
  6114.       switch ( ( conversiontype ) ) 
  6115.       {case 0 : 
  6116.         {
  6117.           if ( ( exbufptr == 0 ) ) 
  6118.           ; 
  6119.           else if ( ( ( prevcolon ) && ( lexclass [ exbuf [ exbufptr - 1 ] 
  6120.           ] == 1 ) ) ) 
  6121.           ; 
  6122.           else lowercase ( exbuf , exbufptr , 1 ) ; 
  6123.           if ( ( exbuf [ exbufptr ] == 58 ) ) 
  6124.           prevcolon = true ; 
  6125.           else if ( ( lexclass [ exbuf [ exbufptr ] ] != 1 ) ) 
  6126.           prevcolon = false ; 
  6127.         } 
  6128.         break ; 
  6129.       case 1 : 
  6130.         lowercase ( exbuf , exbufptr , 1 ) ; 
  6131.         break ; 
  6132.       case 2 : 
  6133.         uppercase ( exbuf , exbufptr , 1 ) ; 
  6134.         break ; 
  6135.       case 3 : 
  6136.         ; 
  6137.         break ; 
  6138.         default: 
  6139.         caseconversionconfus () ; 
  6140.         break ; 
  6141.       } 
  6142.     } 
  6143.     incr ( exbufptr ) ; 
  6144.       } 
  6145.       checkbracelevel ( poplit2 ) ; 
  6146.     } 
  6147.     addpoolbufandpush () ; 
  6148.   } 
  6149.  
  6150. }
  6151. void xchrtoint (void) {
  6152.     poplitstk ( poplit1 , poptyp1 ) ; 
  6153.   if ( ( poptyp1 != 1 ) ) 
  6154.   {
  6155.     printwrongstklit ( poplit1 , poptyp1 , 1 ) ; 
  6156.     pushlitstk ( 0 , 0 ) ; 
  6157.   } 
  6158.   else if ( ( ( strstart [ poplit1 + 1 ] - strstart [ poplit1 ] ) != 1 ) ) 
  6159.   {
  6160.     {
  6161.       (void) FPutC( '"' , logfile );
  6162.       (void) FPutC( '"' );
  6163.     } 
  6164.     printapoolstr ( poplit1 ) ; 
  6165.     {
  6166.       {
  6167.     (void) ReverseFPuts( logfile ,  "¥" isn't a single character" ) ; 
  6168.     (void) FPrintFStdErr(  "¥" isn't a single character" ) ; 
  6169.       } 
  6170.       bstexwarnprint () ; 
  6171.     } 
  6172.     pushlitstk ( 0 , 0 ) ; 
  6173.   } 
  6174.   else pushlitstk ( strpool [ strstart [ poplit1 ] ] , 0 ) ; 
  6175.  
  6176. }
  6177. void xcite (void) {
  6178.     if ( ( ! messwithentries ) ) 
  6179.   bstcantmesswithentri () ; 
  6180.   else pushlitstk ( citelist [ citeptr ] , 1 ) ; 
  6181.  
  6182. }
  6183. void xduplicate (void) {
  6184.     poplitstk ( poplit1 , poptyp1 ) ; 
  6185.   if ( ( poptyp1 != 1 ) ) 
  6186.   {
  6187.     pushlitstk ( poplit1 , poptyp1 ) ; 
  6188.     pushlitstk ( poplit1 , poptyp1 ) ; 
  6189.   } 
  6190.   else {
  6191.       
  6192.     {
  6193.       if ( ( litstack [ litstkptr ] >= cmdstrptr ) ) 
  6194.       {
  6195.     incr ( strptr ) ; 
  6196.     poolptr = strstart [ strptr ] ; 
  6197.       } 
  6198.       incr ( litstkptr ) ; 
  6199.     } 
  6200.     if ( ( poplit1 < cmdstrptr ) ) 
  6201.     pushlitstk ( poplit1 , poptyp1 ) ; 
  6202.     else {
  6203.     
  6204.       {
  6205.     if ( ( poolptr + ( strstart [ poplit1 + 1 ] - strstart [ poplit1 ] ) > 
  6206.     poolsize ) ) 
  6207.     pooloverflow () ; 
  6208.       } 
  6209.       spptr = strstart [ poplit1 ] ; 
  6210.       spend = strstart [ poplit1 + 1 ] ; 
  6211.       while ( ( spptr < spend ) ) {
  6212.       
  6213.     {
  6214.       strpool [ poolptr ] = strpool [ spptr ] ; 
  6215.       incr ( poolptr ) ; 
  6216.     } 
  6217.     incr ( spptr ) ; 
  6218.       } 
  6219.       pushlitstk ( makestring () , 1 ) ; 
  6220.     } 
  6221.   } 
  6222.  
  6223. }
  6224. void xempty (void) {
  6225.     /* 10 */ poplitstk ( poplit1 , poptyp1 ) ; 
  6226.   switch ( ( poptyp1 ) ) 
  6227.   {case 1 : 
  6228.     {
  6229.       spptr = strstart [ poplit1 ] ; 
  6230.       spend = strstart [ poplit1 + 1 ] ; 
  6231.       while ( ( spptr < spend ) ) {
  6232.       
  6233.     if ( ( lexclass [ strpool [ spptr ] ] != 1 ) ) 
  6234.     {
  6235.       pushlitstk ( 0 , 0 ) ; 
  6236.       goto lab10 ; 
  6237.     } 
  6238.     incr ( spptr ) ; 
  6239.       } 
  6240.       pushlitstk ( 1 , 0 ) ; 
  6241.     } 
  6242.     break ; 
  6243.   case 3 : 
  6244.     pushlitstk ( 1 , 0 ) ; 
  6245.     break ; 
  6246.   case 4 : 
  6247.     pushlitstk ( 0 , 0 ) ; 
  6248.     break ; 
  6249.     default: 
  6250.     {
  6251.       printstklit ( poplit1 , poptyp1 ) ; 
  6252.       {
  6253.     {
  6254.       (void) ReverseFPuts( logfile ,  ", not a string or missing field," ) ; 
  6255.       (void) FPrintFStdErr(  ", not a string or missing field," ) ; 
  6256.     } 
  6257.     bstexwarnprint () ; 
  6258.       } 
  6259.       pushlitstk ( 0 , 0 ) ; 
  6260.     } 
  6261.     break ; 
  6262.   } 
  6263.   lab10: ; 
  6264.  
  6265. }
  6266. void xformatname (void) {
  6267.     /* 16 17 52 */ poplitstk ( poplit1 , poptyp1 ) ; 
  6268.   poplitstk ( poplit2 , poptyp2 ) ; 
  6269.   poplitstk ( poplit3 , poptyp3 ) ; 
  6270.   if ( ( poptyp1 != 1 ) ) 
  6271.   {
  6272.     printwrongstklit ( poplit1 , poptyp1 , 1 ) ; 
  6273.     pushlitstk ( snull , 1 ) ; 
  6274.   } 
  6275.   else if ( ( poptyp2 != 0 ) ) 
  6276.   {
  6277.     printwrongstklit ( poplit2 , poptyp2 , 0 ) ; 
  6278.     pushlitstk ( snull , 1 ) ; 
  6279.   } 
  6280.   else if ( ( poptyp3 != 1 ) ) 
  6281.   {
  6282.     printwrongstklit ( poplit3 , poptyp3 , 1 ) ; 
  6283.     pushlitstk ( snull , 1 ) ; 
  6284.   } 
  6285.   else {
  6286.       
  6287.     exbuflength = 0 ; 
  6288.     addbufpool ( poplit3 ) ; 
  6289.     {
  6290.       exbufptr = 0 ; 
  6291.       numnames = 0 ; 
  6292.       while ( ( ( numnames < poplit2 ) && ( exbufptr < exbuflength ) ) ) {
  6293.       
  6294.     incr ( numnames ) ; 
  6295.     exbufxptr = exbufptr ; 
  6296.     namescanforand ( poplit3 ) ; 
  6297.       } 
  6298.       if ( ( exbufptr < exbuflength ) ) 
  6299.       exbufptr = exbufptr - 4 ; 
  6300.       if ( ( numnames < poplit2 ) ) 
  6301.       {
  6302.     if ( ( poplit2 == 1 ) ) 
  6303.     {
  6304.       (void) ReverseFPuts( logfile ,  "There is no name in ¥"" ) ; 
  6305.       (void) FPrintFStdErr(  "There is no name in ¥"" ) ; 
  6306.     } 
  6307.     else {
  6308.         
  6309.       (void) FPrintF( logfile , "%s%ld%s",  "There aren't " , (long)poplit2 , " names in ¥"" ) ; 
  6310.       (void) FPrintFStdErr( "%s%ld%s",  "There aren't " , (long)poplit2 , " names in ¥"" ) ; 
  6311.     } 
  6312.     printapoolstr ( poplit3 ) ; 
  6313.     {
  6314.       {
  6315.         (void) FPutC( '"' , logfile );
  6316.         (void) FPutC( '"' );
  6317.       } 
  6318.       bstexwarnprint () ; 
  6319.     } 
  6320.       } 
  6321.     } 
  6322.     {
  6323.       {
  6324.     while ( ( ( exbufxptr < exbufptr ) && ( lexclass [ exbuf [ exbufptr ] 
  6325.     ] == 1 ) && ( lexclass [ exbuf [ exbufptr ] ] == 4 ) ) ) incr ( 
  6326.     exbufxptr ) ; 
  6327.     while ( ( exbufptr > exbufxptr ) ) switch ( ( lexclass [ exbuf [ 
  6328.     exbufptr - 1 ] ] ) ) 
  6329.     {case 1 : 
  6330.     case 4 : 
  6331.       decr ( exbufptr ) ; 
  6332.       break ; 
  6333.       default: 
  6334.       if ( ( exbuf [ exbufptr - 1 ] == 44 ) ) 
  6335.       {
  6336.         {
  6337.           (void) FPrintF( logfile , "%s%ld%s",  "Name " , (long)poplit2 , " in ¥"" ) ; 
  6338.           (void) FPrintFStdErr( "%s%ld%s",  "Name " , (long)poplit2 , " in ¥"" ) ; 
  6339.         } 
  6340.         printapoolstr ( poplit3 ) ; 
  6341.         {
  6342.           (void) ReverseFPuts( logfile ,  "¥" has a comma at the end" ) ; 
  6343.           (void) FPrintFStdErr(  "¥" has a comma at the end" ) ; 
  6344.         } 
  6345.         bstexwarnprint () ; 
  6346.         decr ( exbufptr ) ; 
  6347.       } 
  6348.       else goto lab16 ; 
  6349.       break ; 
  6350.     } 
  6351.     lab16: ; 
  6352.       } 
  6353.       namebfptr = 0 ; 
  6354.       numcommas = 0 ; 
  6355.       numtokens = 0 ; 
  6356.       tokenstarting = true ; 
  6357.       while ( ( exbufxptr < exbufptr ) ) switch ( ( exbuf [ exbufxptr ] ) ) 
  6358.       {case 44 : 
  6359.     {
  6360.       if ( ( numcommas == 2 ) ) 
  6361.       {
  6362.         {
  6363.           (void) FPrintF( logfile , "%s%ld%s",  "Too many commas in name " , (long)poplit2 ,               " of ¥"" ) ; 
  6364.           (void) FPrintFStdErr( "%s%ld%s",  "Too many commas in name " , (long)poplit2 , " of ¥""               ) ; 
  6365.         } 
  6366.         printapoolstr ( poplit3 ) ; 
  6367.         {
  6368.           (void) FPutC( '"' , logfile );
  6369.           (void) FPutC( '"' );
  6370.         } 
  6371.         bstexwarnprint () ; 
  6372.       } 
  6373.       else {
  6374.           
  6375.         incr ( numcommas ) ; 
  6376.         if ( ( numcommas == 1 ) ) 
  6377.         comma1 = numtokens ; 
  6378.         else comma2 = numtokens ; 
  6379.         namesepchar [ numtokens ] = 44 ; 
  6380.       } 
  6381.       incr ( exbufxptr ) ; 
  6382.       tokenstarting = true ; 
  6383.     } 
  6384.     break ; 
  6385.       case 123 : 
  6386.     {
  6387.       incr ( bracelevel ) ; 
  6388.       if ( ( tokenstarting ) ) 
  6389.       {
  6390.         nametok [ numtokens ] = namebfptr ; 
  6391.         incr ( numtokens ) ; 
  6392.       } 
  6393.       svbuffer [ namebfptr ] = exbuf [ exbufxptr ] ; 
  6394.       incr ( namebfptr ) ; 
  6395.       incr ( exbufxptr ) ; 
  6396.       while ( ( ( bracelevel > 0 ) && ( exbufxptr < exbufptr ) ) ) {
  6397.           
  6398.         if ( ( exbuf [ exbufxptr ] == 125 ) ) 
  6399.         decr ( bracelevel ) ; 
  6400.         else if ( ( exbuf [ exbufxptr ] == 123 ) ) 
  6401.         incr ( bracelevel ) ; 
  6402.         svbuffer [ namebfptr ] = exbuf [ exbufxptr ] ; 
  6403.         incr ( namebfptr ) ; 
  6404.         incr ( exbufxptr ) ; 
  6405.       } 
  6406.       tokenstarting = false ; 
  6407.     } 
  6408.     break ; 
  6409.       case 125 : 
  6410.     {
  6411.       if ( ( tokenstarting ) ) 
  6412.       {
  6413.         nametok [ numtokens ] = namebfptr ; 
  6414.         incr ( numtokens ) ; 
  6415.       } 
  6416.       {
  6417.         (void) FPrintF( logfile , "%s%ld%s",  "Name " , (long)poplit2 , " of ¥"" ) ; 
  6418.         (void) FPrintFStdErr( "%s%ld%s",  "Name " , (long)poplit2 , " of ¥"" ) ; 
  6419.       } 
  6420.       printapoolstr ( poplit3 ) ; 
  6421.       {
  6422.         {
  6423.           (void) ReverseFPuts( logfile ,  "¥" isn't brace balanced" ) ; 
  6424.           (void) FPrintFStdErr(  "¥" isn't brace balanced" ) ; 
  6425.         } 
  6426.         bstexwarnprint () ; 
  6427.       } 
  6428.       incr ( exbufxptr ) ; 
  6429.       tokenstarting = false ; 
  6430.     } 
  6431.     break ; 
  6432.     default: 
  6433.     switch ( ( lexclass [ exbuf [ exbufxptr ] ] ) ) 
  6434.     {case 1 : 
  6435.       {
  6436.         if ( ( ! tokenstarting ) ) 
  6437.         namesepchar [ numtokens ] = 32 ; 
  6438.         incr ( exbufxptr ) ; 
  6439.         tokenstarting = true ; 
  6440.       } 
  6441.       break ; 
  6442.     case 4 : 
  6443.       {
  6444.         if ( ( ! tokenstarting ) ) 
  6445.         namesepchar [ numtokens ] = exbuf [ exbufxptr ] ; 
  6446.         incr ( exbufxptr ) ; 
  6447.         tokenstarting = true ; 
  6448.       } 
  6449.       break ; 
  6450.       default: 
  6451.       {
  6452.         if ( ( tokenstarting ) ) 
  6453.         {
  6454.           nametok [ numtokens ] = namebfptr ; 
  6455.           incr ( numtokens ) ; 
  6456.         } 
  6457.         svbuffer [ namebfptr ] = exbuf [ exbufxptr ] ; 
  6458.         incr ( namebfptr ) ; 
  6459.         incr ( exbufxptr ) ; 
  6460.         tokenstarting = false ; 
  6461.       } 
  6462.       break ; 
  6463.     } 
  6464.     break ; 
  6465.       } 
  6466.       nametok [ numtokens ] = namebfptr ; 
  6467.     } 
  6468.     {
  6469.       if ( ( numcommas == 0 ) ) 
  6470.       {
  6471.     firststart = 0 ; 
  6472.     lastend = numtokens ; 
  6473.     jrend = lastend ; 
  6474.     {
  6475.       vonstart = 0 ; 
  6476.       while ( ( vonstart < lastend - 1 ) ) {
  6477.           
  6478.         namebfptr = nametok [ vonstart ] ; 
  6479.         namebfxptr = nametok [ vonstart + 1 ] ; 
  6480.         if ( ( vontokenfound () ) ) 
  6481.         {
  6482.           vonnameendsandlastna () ; 
  6483.           goto lab52 ; 
  6484.         } 
  6485.         incr ( vonstart ) ; 
  6486.       } 
  6487.       while ( ( vonstart > 0 ) ) {
  6488.           
  6489.         if ( ( ( lexclass [ namesepchar [ vonstart ] ] != 4 ) || ( 
  6490.         namesepchar [ vonstart ] == 126 ) ) ) 
  6491.         goto lab17 ; 
  6492.         decr ( vonstart ) ; 
  6493.       } 
  6494.       lab17: vonend = vonstart ; 
  6495.       lab52: firstend = vonstart ; 
  6496.     } 
  6497.       } 
  6498.       else if ( ( numcommas == 1 ) ) 
  6499.       {
  6500.     vonstart = 0 ; 
  6501.     lastend = comma1 ; 
  6502.     jrend = lastend ; 
  6503.     firststart = jrend ; 
  6504.     firstend = numtokens ; 
  6505.     vonnameendsandlastna () ; 
  6506.       } 
  6507.       else if ( ( numcommas == 2 ) ) 
  6508.       {
  6509.     vonstart = 0 ; 
  6510.     lastend = comma1 ; 
  6511.     jrend = comma2 ; 
  6512.     firststart = jrend ; 
  6513.     firstend = numtokens ; 
  6514.     vonnameendsandlastna () ; 
  6515.       } 
  6516.       else {
  6517.       
  6518.     {
  6519.       (void) ReverseFPuts( logfile ,  "Illegal number of comma,s" ) ; 
  6520.       (void) FPrintFStdErr(  "Illegal number of comma,s" ) ; 
  6521.     } 
  6522.     printconfusion () ; 
  6523.     longjmp(jmp9998,1) ; 
  6524.       } 
  6525.     } 
  6526.     exbuflength = 0 ; 
  6527.     addbufpool ( poplit1 ) ; 
  6528.     figureouttheformatte () ; 
  6529.     addpoolbufandpush () ; 
  6530.   } 
  6531.  
  6532. }
  6533. void xinttochr (void) {
  6534.     poplitstk ( poplit1 , poptyp1 ) ; 
  6535.   if ( ( poptyp1 != 0 ) ) 
  6536.   {
  6537.     printwrongstklit ( poplit1 , poptyp1 , 0 ) ; 
  6538.     pushlitstk ( snull , 1 ) ; 
  6539.   } 
  6540.   else if ( ( ( poplit1 < 0 ) || ( poplit1 > 127 ) ) ) 
  6541.   {
  6542.     {
  6543.       {
  6544.     (void) FPrintF( logfile , "%ld%s",  (long)poplit1 , " isn't valid ASCII" ) ; 
  6545.     (void) FPrintFStdErr( "%ld%s",  (long)poplit1 , " isn't valid ASCII" ) ; 
  6546.       } 
  6547.       bstexwarnprint () ; 
  6548.     } 
  6549.     pushlitstk ( snull , 1 ) ; 
  6550.   } 
  6551.   else {
  6552.       
  6553.     {
  6554.       if ( ( poolptr + 1 > poolsize ) ) 
  6555.       pooloverflow () ; 
  6556.     } 
  6557.     {
  6558.       strpool [ poolptr ] = poplit1 ; 
  6559.       incr ( poolptr ) ; 
  6560.     } 
  6561.     pushlitstk ( makestring () , 1 ) ; 
  6562.   } 
  6563.  
  6564.  
  6565. }
  6566. void xinttostr (void) {
  6567.     poplitstk ( poplit1 , poptyp1 ) ; 
  6568.   if ( ( poptyp1 != 0 ) ) 
  6569.   {
  6570.     printwrongstklit ( poplit1 , poptyp1 , 0 ) ; 
  6571.     pushlitstk ( snull , 1 ) ; 
  6572.   } 
  6573.   else {
  6574.       
  6575.     inttoASCII ( poplit1 , exbuf , 0 , exbuflength ) ; 
  6576.     addpoolbufandpush () ; 
  6577.   } 
  6578.  
  6579.  
  6580. }
  6581. void xmissing (void) {
  6582.     poplitstk ( poplit1 , poptyp1 ) ; 
  6583.   if ( ( ! messwithentries ) ) 
  6584.   bstcantmesswithentri () ; 
  6585.   else if ( ( ( poptyp1 != 1 ) && ( poptyp1 != 3 ) ) ) 
  6586.   {
  6587.     if ( ( poptyp1 != 4 ) ) 
  6588.     {
  6589.       printstklit ( poplit1 , poptyp1 ) ; 
  6590.       {
  6591.     {
  6592.       (void) ReverseFPuts( logfile ,  ", not a string or missing field," ) ; 
  6593.       (void) FPrintFStdErr(  ", not a string or missing field," ) ; 
  6594.     } 
  6595.     bstexwarnprint () ; 
  6596.       } 
  6597.     } 
  6598.     pushlitstk ( 0 , 0 ) ; 
  6599.   } 
  6600.   else if ( ( poptyp1 == 3 ) ) 
  6601.   pushlitstk ( 1 , 0 ) ; 
  6602.   else pushlitstk ( 0 , 0 ) ; 
  6603.  
  6604.  
  6605. }
  6606. void xnumnames (void) {
  6607.     poplitstk ( poplit1 , poptyp1 ) ; 
  6608.   if ( ( poptyp1 != 1 ) ) 
  6609.   {
  6610.     printwrongstklit ( poplit1 , poptyp1 , 1 ) ; 
  6611.     pushlitstk ( 0 , 0 ) ; 
  6612.   } 
  6613.   else {
  6614.       
  6615.     exbuflength = 0 ; 
  6616.     addbufpool ( poplit1 ) ; 
  6617.     {
  6618.       exbufptr = 0 ; 
  6619.       numnames = 0 ; 
  6620.       while ( ( exbufptr < exbuflength ) ) {
  6621.       
  6622.     namescanforand ( poplit1 ) ; 
  6623.     incr ( numnames ) ; 
  6624.       } 
  6625.     } 
  6626.     pushlitstk ( numnames , 0 ) ; 
  6627.   } 
  6628.  
  6629.  
  6630. }
  6631. void xpreamble (void) {
  6632.     exbuflength = 0 ; 
  6633.   preambleptr = 0 ; 
  6634.   while ( ( preambleptr < numpreamblestrings ) ) {
  6635.       
  6636.     addbufpool ( spreamble [ preambleptr ] ) ; 
  6637.     incr ( preambleptr ) ; 
  6638.   } 
  6639.   addpoolbufandpush () ; 
  6640.  
  6641.  
  6642. }
  6643. void xpurify (void) {
  6644.     poplitstk ( poplit1 , poptyp1 ) ; 
  6645.   if ( ( poptyp1 != 1 ) ) 
  6646.   {
  6647.     printwrongstklit ( poplit1 , poptyp1 , 1 ) ; 
  6648.     pushlitstk ( snull , 1 ) ; 
  6649.   } 
  6650.   else {
  6651.       
  6652.     exbuflength = 0 ; 
  6653.     addbufpool ( poplit1 ) ; 
  6654.     {
  6655.       bracelevel = 0 ; 
  6656.       exbufxptr = 0 ; 
  6657.       exbufptr = 0 ; 
  6658.       while ( ( exbufptr < exbuflength ) ) {
  6659.       
  6660.     switch ( ( lexclass [ exbuf [ exbufptr ] ] ) ) 
  6661.     {case 1 : 
  6662.     case 4 : 
  6663.       {
  6664.         exbuf [ exbufxptr ] = 32 ; 
  6665.         incr ( exbufxptr ) ; 
  6666.       } 
  6667.       break ; 
  6668.     case 2 : 
  6669.     case 3 : 
  6670.       {
  6671.         exbuf [ exbufxptr ] = exbuf [ exbufptr ] ; 
  6672.         incr ( exbufxptr ) ; 
  6673.       } 
  6674.       break ; 
  6675.       default: 
  6676.       if ( ( exbuf [ exbufptr ] == 123 ) ) 
  6677.       {
  6678.         incr ( bracelevel ) ; 
  6679.         if ( ( ( bracelevel == 1 ) && ( exbufptr + 1 < exbuflength ) ) ) 
  6680.         if ( ( exbuf [ exbufptr + 1 ] == 92 ) ) 
  6681.         {
  6682.           incr ( exbufptr ) ; 
  6683.           while ( ( ( exbufptr < exbuflength ) && ( bracelevel > 0 ) ) ) {
  6684.           
  6685.         incr ( exbufptr ) ; 
  6686.         exbufyptr = exbufptr ; 
  6687.         while ( ( ( exbufptr < exbuflength ) && ( lexclass [ exbuf [ 
  6688.         exbufptr ] ] == 2 ) ) ) incr ( exbufptr ) ; 
  6689.         controlseqloc = strlookup ( exbuf , exbufyptr , exbufptr - 
  6690.         exbufyptr , 14 , false ) ; 
  6691.         if ( ( hashfound ) ) 
  6692.         {
  6693.           exbuf [ exbufxptr ] = exbuf [ exbufyptr ] ; 
  6694.           incr ( exbufxptr ) ; 
  6695.           switch ( ( ilkinfo [ controlseqloc ] ) ) 
  6696.           {case 2 : 
  6697.           case 3 : 
  6698.           case 4 : 
  6699.           case 5 : 
  6700.           case 12 : 
  6701.             {
  6702.               exbuf [ exbufxptr ] = exbuf [ exbufyptr + 1 ] ; 
  6703.               incr ( exbufxptr ) ; 
  6704.             } 
  6705.             break ; 
  6706.             default: 
  6707.             ; 
  6708.             break ; 
  6709.           } 
  6710.         } 
  6711.         while ( ( ( exbufptr < exbuflength ) && ( bracelevel > 0 ) && 
  6712.         ( exbuf [ exbufptr ] != 92 ) ) ) {
  6713.             
  6714.           switch ( ( lexclass [ exbuf [ exbufptr ] ] ) ) 
  6715.           {case 2 : 
  6716.           case 3 : 
  6717.             {
  6718.               exbuf [ exbufxptr ] = exbuf [ exbufptr ] ; 
  6719.               incr ( exbufxptr ) ; 
  6720.             } 
  6721.             break ; 
  6722.             default: 
  6723.             if ( ( exbuf [ exbufptr ] == 125 ) ) 
  6724.             decr ( bracelevel ) ; 
  6725.             else if ( ( exbuf [ exbufptr ] == 123 ) ) 
  6726.             incr ( bracelevel ) ; 
  6727.             break ; 
  6728.           } 
  6729.           incr ( exbufptr ) ; 
  6730.         } 
  6731.           } 
  6732.           decr ( exbufptr ) ; 
  6733.         } 
  6734.       } 
  6735.       else if ( ( exbuf [ exbufptr ] == 125 ) ) 
  6736.       if ( ( bracelevel > 0 ) ) 
  6737.       decr ( bracelevel ) ; 
  6738.       break ; 
  6739.     } 
  6740.     incr ( exbufptr ) ; 
  6741.       } 
  6742.       exbuflength = exbufxptr ; 
  6743.     } 
  6744.     addpoolbufandpush () ; 
  6745.   } 
  6746.  
  6747.  
  6748. }
  6749. void xquote (void) {
  6750.     { 
  6751.     if ( ( poolptr + 1 > poolsize ) ) 
  6752.     pooloverflow () ; 
  6753.   } 
  6754.   {
  6755.     strpool [ poolptr ] = 34 ; 
  6756.     incr ( poolptr ) ; 
  6757.   } 
  6758.   pushlitstk ( makestring () , 1 ) ; 
  6759.  
  6760.  
  6761. }
  6762. void xsubstring (void) {
  6763.     /* 10 */ poplitstk ( poplit1 , poptyp1 ) ; 
  6764.   poplitstk ( poplit2 , poptyp2 ) ; 
  6765.   poplitstk ( poplit3 , poptyp3 ) ; 
  6766.   if ( ( poptyp1 != 0 ) ) 
  6767.   {
  6768.     printwrongstklit ( poplit1 , poptyp1 , 0 ) ; 
  6769.     pushlitstk ( snull , 1 ) ; 
  6770.   } 
  6771.   else if ( ( poptyp2 != 0 ) ) 
  6772.   {
  6773.     printwrongstklit ( poplit2 , poptyp2 , 0 ) ; 
  6774.     pushlitstk ( snull , 1 ) ; 
  6775.   } 
  6776.   else if ( ( poptyp3 != 1 ) ) 
  6777.   {
  6778.     printwrongstklit ( poplit3 , poptyp3 , 1 ) ; 
  6779.     pushlitstk ( snull , 1 ) ; 
  6780.   } 
  6781.   else {
  6782.       
  6783.     splength = ( strstart [ poplit3 + 1 ] - strstart [ poplit3 ] ) ; 
  6784.     if ( ( poplit1 >= splength ) ) 
  6785.     if ( ( ( poplit2 == 1 ) || ( poplit2 == -1 ) ) ) 
  6786.     {
  6787.       {
  6788.     if ( ( litstack [ litstkptr ] >= cmdstrptr ) ) 
  6789.     {
  6790.       incr ( strptr ) ; 
  6791.       poolptr = strstart [ strptr ] ; 
  6792.     } 
  6793.     incr ( litstkptr ) ; 
  6794.       } 
  6795.       goto lab10 ; 
  6796.     } 
  6797.     if ( ( ( poplit1 <= 0 ) || ( poplit2 == 0 ) || ( poplit2 > splength ) || ( 
  6798.     poplit2 < - (integer) splength ) ) ) 
  6799.     {
  6800.       pushlitstk ( snull , 1 ) ; 
  6801.       goto lab10 ; 
  6802.     } 
  6803.     else {
  6804.     
  6805.       if ( ( poplit2 > 0 ) ) 
  6806.       {
  6807.     if ( ( poplit1 > splength - ( poplit2 - 1 ) ) ) 
  6808.     poplit1 = splength - ( poplit2 - 1 ) ; 
  6809.     spptr = strstart [ poplit3 ] + ( poplit2 - 1 ) ; 
  6810.     spend = spptr + poplit1 ; 
  6811.     if ( ( poplit2 == 1 ) ) 
  6812.     if ( ( poplit3 >= cmdstrptr ) ) 
  6813.     {
  6814.       strstart [ poplit3 + 1 ] = spend ; 
  6815.       {
  6816.         incr ( strptr ) ; 
  6817.         poolptr = strstart [ strptr ] ; 
  6818.       } 
  6819.       incr ( litstkptr ) ; 
  6820.       goto lab10 ; 
  6821.     } 
  6822.       } 
  6823.       else {
  6824.       
  6825.     poplit2 = - (integer) poplit2 ; 
  6826.     if ( ( poplit1 > splength - ( poplit2 - 1 ) ) ) 
  6827.     poplit1 = splength - ( poplit2 - 1 ) ; 
  6828.     spend = strstart [ poplit3 + 1 ] - ( poplit2 - 1 ) ; 
  6829.     spptr = spend - poplit1 ; 
  6830.       } 
  6831.       while ( ( spptr < spend ) ) {
  6832.       
  6833.     {
  6834.       strpool [ poolptr ] = strpool [ spptr ] ; 
  6835.       incr ( poolptr ) ; 
  6836.     } 
  6837.     incr ( spptr ) ; 
  6838.       } 
  6839.       pushlitstk ( makestring () , 1 ) ; 
  6840.     } 
  6841.   } 
  6842.   lab10: ; 
  6843.  
  6844.  
  6845. }
  6846. void xswap (void) {
  6847.     poplitstk ( poplit1 , poptyp1 ) ; 
  6848.   poplitstk ( poplit2 , poptyp2 ) ; 
  6849.   if ( ( ( poptyp1 != 1 ) || ( poplit1 < cmdstrptr ) ) ) 
  6850.   {
  6851.     pushlitstk ( poplit1 , poptyp1 ) ; 
  6852.     if ( ( ( poptyp2 == 1 ) && ( poplit2 >= cmdstrptr ) ) ) 
  6853.     {
  6854.       incr ( strptr ) ; 
  6855.       poolptr = strstart [ strptr ] ; 
  6856.     } 
  6857.     pushlitstk ( poplit2 , poptyp2 ) ; 
  6858.   } 
  6859.   else if ( ( ( poptyp2 != 1 ) || ( poplit2 < cmdstrptr ) ) ) 
  6860.   {
  6861.     {
  6862.       incr ( strptr ) ; 
  6863.       poolptr = strstart [ strptr ] ; 
  6864.     } 
  6865.     pushlitstk ( poplit1 , 1 ) ; 
  6866.     pushlitstk ( poplit2 , poptyp2 ) ; 
  6867.   } 
  6868.   else {
  6869.       
  6870.     exbuflength = 0 ; 
  6871.     addbufpool ( poplit2 ) ; 
  6872.     spptr = strstart [ poplit1 ] ; 
  6873.     spend = strstart [ poplit1 + 1 ] ; 
  6874.     while ( ( spptr < spend ) ) {
  6875.     
  6876.       {
  6877.     strpool [ poolptr ] = strpool [ spptr ] ; 
  6878.     incr ( poolptr ) ; 
  6879.       } 
  6880.       incr ( spptr ) ; 
  6881.     } 
  6882.     pushlitstk ( makestring () , 1 ) ; 
  6883.     addpoolbufandpush () ; 
  6884.   } 
  6885.  
  6886.  
  6887. }
  6888. void xtextlength (void) {
  6889.     poplitstk ( poplit1 , poptyp1 ) ; 
  6890.   if ( ( poptyp1 != 1 ) ) 
  6891.   {
  6892.     printwrongstklit ( poplit1 , poptyp1 , 1 ) ; 
  6893.     pushlitstk ( snull , 1 ) ; 
  6894.   } 
  6895.   else {
  6896.       
  6897.     numtextchars = 0 ; 
  6898.     {
  6899.       spptr = strstart [ poplit1 ] ; 
  6900.       spend = strstart [ poplit1 + 1 ] ; 
  6901.       spbracelevel = 0 ; 
  6902.       while ( ( spptr < spend ) ) {
  6903.       
  6904.     incr ( spptr ) ; 
  6905.     if ( ( strpool [ spptr - 1 ] == 123 ) ) 
  6906.     {
  6907.       incr ( spbracelevel ) ; 
  6908.       if ( ( ( spbracelevel == 1 ) && ( spptr < spend ) ) ) 
  6909.       if ( ( strpool [ spptr ] == 92 ) ) 
  6910.       {
  6911.         incr ( spptr ) ; 
  6912.         while ( ( ( spptr < spend ) && ( spbracelevel > 0 ) ) ) {
  6913.         
  6914.           if ( ( strpool [ spptr ] == 125 ) ) 
  6915.           decr ( spbracelevel ) ; 
  6916.           else if ( ( strpool [ spptr ] == 123 ) ) 
  6917.           incr ( spbracelevel ) ; 
  6918.           incr ( spptr ) ; 
  6919.         } 
  6920.         incr ( numtextchars ) ; 
  6921.       } 
  6922.     } 
  6923.     else if ( ( strpool [ spptr - 1 ] == 125 ) ) 
  6924.     {
  6925.       if ( ( spbracelevel > 0 ) ) 
  6926.       decr ( spbracelevel ) ; 
  6927.     } 
  6928.     else incr ( numtextchars ) ; 
  6929.       } 
  6930.     } 
  6931.     pushlitstk ( numtextchars , 0 ) ; 
  6932.   } 
  6933.  
  6934.  
  6935. }
  6936. void xtextprefix (void) {
  6937.     /* 10 */ poplitstk ( poplit1 , poptyp1 ) ; 
  6938.   poplitstk ( poplit2 , poptyp2 ) ; 
  6939.   if ( ( poptyp1 != 0 ) ) 
  6940.   {
  6941.     printwrongstklit ( poplit1 , poptyp1 , 0 ) ; 
  6942.     pushlitstk ( snull , 1 ) ; 
  6943.   } 
  6944.   else if ( ( poptyp2 != 1 ) ) 
  6945.   {
  6946.     printwrongstklit ( poplit2 , poptyp2 , 1 ) ; 
  6947.     pushlitstk ( snull , 1 ) ; 
  6948.   } 
  6949.   else if ( ( poplit1 <= 0 ) ) 
  6950.   {
  6951.     pushlitstk ( snull , 1 ) ; 
  6952.     goto lab10 ; 
  6953.   } 
  6954.   else {
  6955.       
  6956.     spptr = strstart [ poplit2 ] ; 
  6957.     spend = strstart [ poplit2 + 1 ] ; 
  6958.     {
  6959.       numtextchars = 0 ; 
  6960.       spbracelevel = 0 ; 
  6961.       spxptr1 = spptr ; 
  6962.       while ( ( ( spxptr1 < spend ) && ( numtextchars < poplit1 ) ) ) {
  6963.       
  6964.     incr ( spxptr1 ) ; 
  6965.     if ( ( strpool [ spxptr1 - 1 ] == 123 ) ) 
  6966.     {
  6967.       incr ( spbracelevel ) ; 
  6968.       if ( ( ( spbracelevel == 1 ) && ( spxptr1 < spend ) ) ) 
  6969.       if ( ( strpool [ spxptr1 ] == 92 ) ) 
  6970.       {
  6971.         incr ( spxptr1 ) ; 
  6972.         while ( ( ( spxptr1 < spend ) && ( spbracelevel > 0 ) ) ) {
  6973.         
  6974.           if ( ( strpool [ spxptr1 ] == 125 ) ) 
  6975.           decr ( spbracelevel ) ; 
  6976.           else if ( ( strpool [ spxptr1 ] == 123 ) ) 
  6977.           incr ( spbracelevel ) ; 
  6978.           incr ( spxptr1 ) ; 
  6979.         } 
  6980.         incr ( numtextchars ) ; 
  6981.       } 
  6982.     } 
  6983.     else if ( ( strpool [ spxptr1 - 1 ] == 125 ) ) 
  6984.     {
  6985.       if ( ( spbracelevel > 0 ) ) 
  6986.       decr ( spbracelevel ) ; 
  6987.     } 
  6988.     else incr ( numtextchars ) ; 
  6989.       } 
  6990.       spend = spxptr1 ; 
  6991.     } 
  6992.     if ( ( poplit2 >= cmdstrptr ) ) 
  6993.     poolptr = spend ; 
  6994.     else while ( ( spptr < spend ) ) {
  6995.     
  6996.       {
  6997.     strpool [ poolptr ] = strpool [ spptr ] ; 
  6998.     incr ( poolptr ) ; 
  6999.       } 
  7000.       incr ( spptr ) ; 
  7001.     } 
  7002.     while ( ( spbracelevel > 0 ) ) {
  7003.     
  7004.       {
  7005.     strpool [ poolptr ] = 125 ; 
  7006.     incr ( poolptr ) ; 
  7007.       } 
  7008.       decr ( spbracelevel ) ; 
  7009.     } 
  7010.     pushlitstk ( makestring () , 1 ) ; 
  7011.   } 
  7012.   lab10: ; 
  7013.  
  7014.  
  7015. }
  7016. void xtype (void) {
  7017.     if ( ( ! messwithentries ) ) 
  7018.   bstcantmesswithentri () ; 
  7019.   else if ( ( ( typelist [ citeptr ] == hashsize+1 ) || ( typelist [ citeptr ] == 0 
  7020.   ) ) ) 
  7021.   pushlitstk ( snull , 1 ) ; 
  7022.   else pushlitstk ( hashtext [ typelist [ citeptr ] ] , 1 ) ; 
  7023.  
  7024.  
  7025. }
  7026. void xwarning (void) {
  7027.     poplitstk ( poplit1 , poptyp1 ) ; 
  7028.   if ( ( poptyp1 != 1 ) ) 
  7029.   printwrongstklit ( poplit1 , poptyp1 , 1 ) ; 
  7030.   else {
  7031.       
  7032.     {
  7033.       (void) ReverseFPuts( logfile ,  "Warning--" ) ; 
  7034.       (void) FPrintFStdErr(  "Warning--" ) ; 
  7035.     } 
  7036.     printlit ( poplit1 , poptyp1 ) ; 
  7037.     markwarning () ; 
  7038.   } 
  7039.  
  7040.  
  7041. }
  7042. void xwidth (void) {
  7043.     poplitstk ( poplit1 , poptyp1 ) ; 
  7044.   if ( ( poptyp1 != 1 ) ) 
  7045.   {
  7046.     printwrongstklit ( poplit1 , poptyp1 , 1 ) ; 
  7047.     pushlitstk ( 0 , 0 ) ; 
  7048.   } 
  7049.   else {
  7050.       
  7051.     exbuflength = 0 ; 
  7052.     addbufpool ( poplit1 ) ; 
  7053.     bibstringwidth = 0 ; 
  7054.     {
  7055.       bracelevel = 0 ; 
  7056.       exbufptr = 0 ; 
  7057.       while ( ( exbufptr < exbuflength ) ) {
  7058.       
  7059.     if ( ( exbuf [ exbufptr ] == 123 ) ) 
  7060.     {
  7061.       incr ( bracelevel ) ; 
  7062.       if ( ( ( bracelevel == 1 ) && ( exbufptr + 1 < exbuflength ) ) ) 
  7063.       if ( ( exbuf [ exbufptr + 1 ] == 92 ) ) 
  7064.       {
  7065.         incr ( exbufptr ) ; 
  7066.         while ( ( ( exbufptr < exbuflength ) && ( bracelevel > 0 ) ) ) {
  7067.         
  7068.           incr ( exbufptr ) ; 
  7069.           exbufxptr = exbufptr ; 
  7070.           while ( ( ( exbufptr < exbuflength ) && ( lexclass [ exbuf [ 
  7071.           exbufptr ] ] == 2 ) ) ) incr ( exbufptr ) ; 
  7072.           if ( ( ( exbufptr < exbuflength ) && ( exbufptr == exbufxptr ) ) 
  7073.           ) 
  7074.           incr ( exbufptr ) ; 
  7075.           else {
  7076.           
  7077.         controlseqloc = strlookup ( exbuf , exbufxptr , exbufptr - 
  7078.         exbufxptr , 14 , false ) ; 
  7079.         if ( ( hashfound ) ) 
  7080.         {
  7081.           switch ( ( ilkinfo [ controlseqloc ] ) ) 
  7082.           {case 12 : 
  7083.             bibstringwidth = bibstringwidth + 500 ; 
  7084.             break ; 
  7085.           case 4 : 
  7086.             bibstringwidth = bibstringwidth + 722 ; 
  7087.             break ; 
  7088.           case 2 : 
  7089.             bibstringwidth = bibstringwidth + 778 ; 
  7090.             break ; 
  7091.           case 5 : 
  7092.             bibstringwidth = bibstringwidth + 903 ; 
  7093.             break ; 
  7094.           case 3 : 
  7095.             bibstringwidth = bibstringwidth + 1014 ; 
  7096.             break ; 
  7097.             default: 
  7098.             bibstringwidth = bibstringwidth + charwidth [ exbuf [ exbufxptr 
  7099.             ] ] ; 
  7100.             break ; 
  7101.           } 
  7102.         } 
  7103.           } 
  7104.           while ( ( ( exbufptr < exbuflength ) && ( lexclass [ exbuf [ 
  7105.           exbufptr ] ] == 1 ) ) ) incr ( exbufptr ) ; 
  7106.           while ( ( ( exbufptr < exbuflength ) && ( bracelevel > 0 ) && ( 
  7107.           exbuf [ exbufptr ] != 92 ) ) ) {
  7108.           
  7109.         if ( ( exbuf [ exbufptr ] == 125 ) ) 
  7110.         decr ( bracelevel ) ; 
  7111.         else if ( ( exbuf [ exbufptr ] == 123 ) ) 
  7112.         incr ( bracelevel ) ; 
  7113.         else bibstringwidth = bibstringwidth + charwidth [ exbuf [ exbufptr 
  7114.         ] ] ; 
  7115.         incr ( exbufptr ) ; 
  7116.           } 
  7117.         } 
  7118.         decr ( exbufptr ) ; 
  7119.       } 
  7120.       else bibstringwidth = bibstringwidth + charwidth [ 123 ] ; 
  7121.       else bibstringwidth = bibstringwidth + charwidth [ 123 ] ; 
  7122.     } 
  7123.     else if ( ( exbuf [ exbufptr ] == 125 ) ) 
  7124.     {
  7125.       decrbracelevel ( poplit1 ) ; 
  7126.       bibstringwidth = bibstringwidth + charwidth [ 125 ] ; 
  7127.     } 
  7128.     else bibstringwidth = bibstringwidth + charwidth [ exbuf [ exbufptr ] ] ; 
  7129.     incr ( exbufptr ) ; 
  7130.       } 
  7131.       checkbracelevel ( poplit1 ) ; 
  7132.     } 
  7133.     pushlitstk ( bibstringwidth , 0 ) ; 
  7134.   } 
  7135.  
  7136.  
  7137. }
  7138. void xwrite (void) {
  7139.     poplitstk ( poplit1 , poptyp1 ) ; 
  7140.   if ( ( poptyp1 != 1 ) ) 
  7141.   printwrongstklit ( poplit1 , poptyp1 , 1 ) ; 
  7142.   else addoutpool ( poplit1 ) ; 
  7143. #include "BibTeX.h"
  7144. #include "BibTeX.p"
  7145. #include "globals.h"
  7146. #include "coerce.h"
  7147.  
  7148. void
  7149. #ifdef STDC
  7150. zexecutefn (hashloc exfnloc ) 
  7151. #else
  7152. zexecutefn ( exfnloc ) 
  7153. hashloc exfnloc ; 
  7154. #endif
  7155. {/* 51 */ integer rpoplt1, rpoplt2  ; 
  7156.   stktype rpoptp1, rpoptp2  ; 
  7157.   wizfnloc wizptr  ; 
  7158.     ;
  7159. #ifdef TRACE
  7160.   {
  7161.     (void) ReverseFPuts( logfile ,  "execute_fn `" ) ; 
  7162.   } 
  7163.   {
  7164.     outpoolstr ( logfile , hashtext [ exfnloc ] ) ; 
  7165.   } 
  7166.   {
  7167.     (void) FPrintF( logfile , "%c¥r",  '¥'' ) ; 
  7168.   } 
  7169. #endif /* TRACE */
  7170.   switch ( ( fntype [ exfnloc ] ) ) 
  7171.   {case 0 : 
  7172.     {
  7173.     ;
  7174. #ifdef STAT
  7175.       incr ( executioncount [ ilkinfo [ exfnloc ] ] ) ; 
  7176. #endif /* STAT */
  7177.       switch ( ( ilkinfo [ exfnloc ] ) ) 
  7178.       {case 0 : 
  7179.     xequals () ; 
  7180.     break ; 
  7181.       case 1 : 
  7182.     xgreaterthan () ; 
  7183.     break ; 
  7184.       case 2 : 
  7185.     xlessthan () ; 
  7186.     break ; 
  7187.       case 3 : 
  7188.     xplus () ; 
  7189.     break ; 
  7190.       case 4 : 
  7191.     xminus () ; 
  7192.     break ; 
  7193.       case 5 : 
  7194.     xconcatenate () ; 
  7195.     break ; 
  7196.       case 6 : 
  7197.     xgets () ; 
  7198.     break ; 
  7199.       case 7 : 
  7200.     xaddperiod () ; 
  7201.     break ; 
  7202.       case 8 : 
  7203.     {
  7204.       if ( ( ! messwithentries ) ) 
  7205.       bstcantmesswithentri () ; 
  7206.       else if ( ( typelist [ citeptr ] == hashsize+1 ) ) 
  7207.       executefn ( bdefault ) ; 
  7208.       else if ( ( typelist [ citeptr ] == 0 ) ) 
  7209.       ; 
  7210.       else executefn ( typelist [ citeptr ] ) ; 
  7211.     } 
  7212.     break ; 
  7213.       case 9 : 
  7214.     xchangecase () ; 
  7215.     break ; 
  7216.       case 10 : 
  7217.     xchrtoint () ; 
  7218.     break ; 
  7219.       case 11 : 
  7220.     xcite () ; 
  7221.     break ; 
  7222.       case 12 : 
  7223.     xduplicate () ; 
  7224.     break ; 
  7225.       case 13 : 
  7226.     xempty () ; 
  7227.     break ; 
  7228.       case 14 : 
  7229.     xformatname () ; 
  7230.     break ; 
  7231.       case 15 : 
  7232.     {
  7233.       poplitstk ( poplit1 , poptyp1 ) ; 
  7234.       poplitstk ( poplit2 , poptyp2 ) ; 
  7235.       poplitstk ( poplit3 , poptyp3 ) ; 
  7236.       if ( ( poptyp1 != 2 ) ) 
  7237.       printwrongstklit ( poplit1 , poptyp1 , 2 ) ; 
  7238.       else if ( ( poptyp2 != 2 ) ) 
  7239.       printwrongstklit ( poplit2 , poptyp2 , 2 ) ; 
  7240.       else if ( ( poptyp3 != 0 ) ) 
  7241.       printwrongstklit ( poplit3 , poptyp3 , 0 ) ; 
  7242.       else if ( ( poplit3 > 0 ) ) 
  7243.       executefn ( poplit2 ) ; 
  7244.       else executefn ( poplit1 ) ; 
  7245.     } 
  7246.     break ; 
  7247.       case 16 : 
  7248.     xinttochr () ; 
  7249.     break ; 
  7250.       case 17 : 
  7251.     xinttostr () ; 
  7252.     break ; 
  7253.       case 18 : 
  7254.     xmissing () ; 
  7255.     break ; 
  7256.       case 19 : 
  7257.     {
  7258.       outputbblline () ; 
  7259.     } 
  7260.     break ; 
  7261.       case 20 : 
  7262.     xnumnames () ; 
  7263.     break ; 
  7264.       case 21 : 
  7265.     {
  7266.       poplitstk ( poplit1 , poptyp1 ) ; 
  7267.     } 
  7268.     break ; 
  7269.       case 22 : 
  7270.     xpreamble () ; 
  7271.     break ; 
  7272.       case 23 : 
  7273.     xpurify () ; 
  7274.     break ; 
  7275.       case 24 : 
  7276.     xquote () ; 
  7277.     break ; 
  7278.       case 25 : 
  7279.     {
  7280.       ; 
  7281.     } 
  7282.     break ; 
  7283.       case 26 : 
  7284.     {
  7285.       popwholestack () ; 
  7286.     } 
  7287.     break ; 
  7288.       case 27 : 
  7289.     xsubstring () ; 
  7290.     break ; 
  7291.       case 28 : 
  7292.     xswap () ; 
  7293.     break ; 
  7294.       case 29 : 
  7295.     xtextlength () ; 
  7296.     break ; 
  7297.       case 30 : 
  7298.     xtextprefix () ; 
  7299.     break ; 
  7300.       case 31 : 
  7301.     {
  7302.       poptopandprint () ; 
  7303.     } 
  7304.     break ; 
  7305.       case 32 : 
  7306.     xtype () ; 
  7307.     break ; 
  7308.       case 33 : 
  7309.     xwarning () ; 
  7310.     break ; 
  7311.       case 34 : 
  7312.     {
  7313.       poplitstk ( rpoplt1 , rpoptp1 ) ; 
  7314.       poplitstk ( rpoplt2 , rpoptp2 ) ; 
  7315.       if ( ( rpoptp1 != 2 ) ) 
  7316.       printwrongstklit ( rpoplt1 , rpoptp1 , 2 ) ; 
  7317.       else if ( ( rpoptp2 != 2 ) ) 
  7318.       printwrongstklit ( rpoplt2 , rpoptp2 , 2 ) ; 
  7319.       else while ( true ) {
  7320.           
  7321.         executefn ( rpoplt2 ) ; 
  7322.         poplitstk ( poplit1 , poptyp1 ) ; 
  7323.         if ( ( poptyp1 != 0 ) ) 
  7324.         {
  7325.           printwrongstklit ( poplit1 , poptyp1 , 0 ) ; 
  7326.           goto lab51 ; 
  7327.         } 
  7328.         else if ( ( poplit1 > 0 ) ) 
  7329.         executefn ( rpoplt1 ) ; 
  7330.         else goto lab51 ; 
  7331.       } 
  7332.       lab51: ; 
  7333.     } 
  7334.     break ; 
  7335.       case 35 : 
  7336.     xwidth () ; 
  7337.     break ; 
  7338.       case 36 : 
  7339.     xwrite () ; 
  7340.     break ; 
  7341.     default: 
  7342.     {
  7343.       {
  7344.         (void) ReverseFPuts( logfile ,  "Unknown built-in function" ) ; 
  7345.         (void) FPrintFStdErr(  "Unknown built-in function" ) ; 
  7346.       } 
  7347.       printconfusion () ; 
  7348.       longjmp(jmp9998,1) ; 
  7349.     } 
  7350.     break ; 
  7351.       } 
  7352.     } 
  7353.     break ; 
  7354.   case 1 : 
  7355.     {
  7356.       wizptr = ilkinfo [ exfnloc ] ; 
  7357.       while ( ( wizfunctions [ wizptr ] != hashsize+1 ) ) {
  7358.       
  7359.     if ( ( wizfunctions [ wizptr ] != 0 ) ) 
  7360.     executefn ( wizfunctions [ wizptr ] ) ; 
  7361.     else {
  7362.         
  7363.       incr ( wizptr ) ; 
  7364.       pushlitstk ( wizfunctions [ wizptr ] , 2 ) ; 
  7365.     } 
  7366.     incr ( wizptr ) ; 
  7367.       } 
  7368.     } 
  7369.     break ; 
  7370.   case 2 : 
  7371.     pushlitstk ( ilkinfo [ exfnloc ] , 0 ) ; 
  7372.     break ; 
  7373.   case 3 : 
  7374.     pushlitstk ( hashtext [ exfnloc ] , 1 ) ; 
  7375.     break ; 
  7376.   case 4 : 
  7377.     {
  7378.       if ( ( ! messwithentries ) ) 
  7379.       bstcantmesswithentri () ; 
  7380.       else {
  7381.       
  7382.     fieldptr = citeptr * numfields + ilkinfo [ exfnloc ] ; 
  7383.     if ( ( fieldinfo [ fieldptr ] == 0 ) ) 
  7384.     pushlitstk ( hashtext [ exfnloc ] , 3 ) ; 
  7385.     else pushlitstk ( fieldinfo [ fieldptr ] , 1 ) ; 
  7386.       } 
  7387.     } 
  7388.     break ; 
  7389.   case 5 : 
  7390.     {
  7391.       if ( ( ! messwithentries ) ) 
  7392.       bstcantmesswithentri () ; 
  7393.       else pushlitstk ( entryints [ citeptr * numentints + ilkinfo [ exfnloc ] 
  7394.       ] , 0 ) ; 
  7395.     } 
  7396.     break ; 
  7397.   case 6 : 
  7398.     {
  7399.       if ( ( ! messwithentries ) ) 
  7400.       bstcantmesswithentri () ; 
  7401.       else {
  7402.       
  7403.     strentptr = citeptr * numentstrs + ilkinfo [ exfnloc ] ; 
  7404.     exbufptr = 0 ; 
  7405.     while ( ( entrystrs [ strentptr ] [ exbufptr ] != 127 ) ) {
  7406.         
  7407.       exbuf [ exbufptr ] = entrystrs [ strentptr ] [ exbufptr ] ; 
  7408.       incr ( exbufptr ) ; 
  7409.     } 
  7410.     exbuflength = exbufptr ; 
  7411.     addpoolbufandpush () ; 
  7412.       } 
  7413.     } 
  7414.     break ; 
  7415.   case 7 : 
  7416.     pushlitstk ( ilkinfo [ exfnloc ] , 0 ) ; 
  7417.     break ; 
  7418.   case 8 : 
  7419.     {
  7420.       strglbptr = ilkinfo [ exfnloc ] ; 
  7421.       if ( ( glbstrptr [ strglbptr ] > 0 ) ) 
  7422.       pushlitstk ( glbstrptr [ strglbptr ] , 1 ) ; 
  7423.       else {
  7424.       
  7425.     {
  7426.       if ( ( poolptr + glbstrend [ strglbptr ] > poolsize ) ) 
  7427.       pooloverflow () ; 
  7428.     } 
  7429.     globchrptr = 0 ; 
  7430.     while ( ( globchrptr < glbstrend [ strglbptr ] ) ) {
  7431.         
  7432.       {
  7433.         strpool [ poolptr ] = globalstrs [ strglbptr ] [ globchrptr ] ; 
  7434.         incr ( poolptr ) ; 
  7435.       } 
  7436.       incr ( globchrptr ) ; 
  7437.     } 
  7438.     pushlitstk ( makestring () , 1 ) ; 
  7439.       } 
  7440.     } 
  7441.     break ; 
  7442.     default: 
  7443.     unknwnfunctionclassc () ; 
  7444.     break ; 
  7445.   } 
  7446.  
  7447.  
  7448. }
  7449. /* Vince changes here */
  7450. void getthetoplevelauxfil (void) {
  7451.     /* 41 46 */ while ( true ) { 
  7452.     
  7453.         // we have the aux-file already, so none of this:
  7454.         /*
  7455.             if ( ( gargc > 1 ) ) 
  7456.             auxnamelength = getcmdline ( nameoffile , 1024 ) ; 
  7457.             else {
  7458.                 
  7459.               (void) FPrintFStdErr(  "Please type input file name (no extension)--" ) ; 
  7460.               auxnamelength = 0 ; 
  7461.               while ( ( ! eoln ( stdin ) ) ) {
  7462.               
  7463.             if ( ( auxnamelength == 1024 ) ) 
  7464.             {
  7465.               readln ( stdin ) ; 
  7466.               {
  7467.                 samtoolongfilenamepr () ; 
  7468.                 goto lab46 ; 
  7469.               } 
  7470.             } 
  7471.             nameoffile [ auxnamelength ] = getc ( stdin ) ; 
  7472.             incr ( auxnamelength ) ; 
  7473.               } 
  7474.               
  7475.             } 
  7476.     */ //end of my cut-out
  7477.     
  7478.     
  7479.         //gAuxDesc is our top file.
  7480.         strncpy(nameoffile, aux_fn, 1024);
  7481.         // currently assume there is an extension
  7482.         auxnamelength = strlen(nameoffile);
  7483.         nameoffile[auxnamelength-4] = '¥0';
  7484.         auxnamelength -= 4;
  7485.         
  7486.     {
  7487.       if ( ( ( auxnamelength + ( strstart [ sauxextension + 1 ] - strstart [ 
  7488.       sauxextension ] ) > 1024 ) || ( auxnamelength + ( strstart [ 
  7489.       slogextension + 1 ] - strstart [ slogextension ] ) > 1024 ) || ( 
  7490.       auxnamelength + ( strstart [ sbblextension + 1 ] - strstart [ 
  7491.       sbblextension ] ) > 1024 ) ) ) 
  7492.       {
  7493.     samtoolongfilenamepr () ; 
  7494.     goto lab46 ; 
  7495.       } 
  7496.       {
  7497.     namelength = auxnamelength ; 
  7498.     addextension ( sauxextension ) ;  
  7499.     auxptr = 0 ; 
  7500.     if ( ( ! aopenin ( auxfile [ auxptr ] ) ) ) 
  7501.     {
  7502.       samwrongfilenameprin () ; 
  7503.       goto lab46 ; 
  7504.     } 
  7505.     namelength = auxnamelength ; 
  7506.     addextension ( slogextension ) ; 
  7507.     if ( ( ! aopenout ( logfile ) ) ) 
  7508.     {
  7509.       samwrongfilenameprin () ; 
  7510.       goto lab46 ; 
  7511.     } 
  7512.     namelength = auxnamelength ; 
  7513.     addextension ( sbblextension ) ; 
  7514.     if ( ( ! aopenout ( bblfile ) ) ) 
  7515.     {
  7516.       samwrongfilenameprin () ; 
  7517.       goto lab46 ; 
  7518.     } 
  7519.       } 
  7520.       {
  7521.     namelength = auxnamelength ; 
  7522.     addextension ( sauxextension ) ; 
  7523.     nameptr = 1 ; 
  7524.     while ( ( nameptr <= namelength ) ) {
  7525.         
  7526.       buffer [ nameptr ] = xord [ nameoffile [ nameptr - 1 ] ] ; 
  7527.       incr ( nameptr ) ; 
  7528.     } 
  7529.     toplevstr = hashtext [ strlookup ( buffer , 1 , auxnamelength , 0 , 
  7530.     true ) ] ; 
  7531.     auxlist [ auxptr ] = hashtext [ strlookup ( buffer , 1 , namelength , 
  7532.     3 , true ) ] ; 
  7533.     if ( ( hashfound ) ) 
  7534.     {
  7535.     ;
  7536. #ifdef TRACE
  7537.       printauxname () ; 
  7538. #endif /* TRACE */
  7539.       {
  7540.         {
  7541.           (void) ReverseFPuts( logfile ,  "Already encountered auxiliary file" ) ; 
  7542.           (void) FPrintFStdErr(  "Already encountered auxiliary file" ) ; 
  7543.         } 
  7544.         printconfusion () ; 
  7545.         longjmp(jmp9998,1) ; 
  7546.       } 
  7547.     } 
  7548.     auxlnstack [ auxptr ] = 0 ; 
  7549.       } 
  7550.       goto lab41 ; 
  7551.     } 
  7552.     lab46: ;//gargc = 0 ; 
  7553.   } 
  7554.   lab41: ; 
  7555.  
  7556.  
  7557. }
  7558. void auxbibdatacommand (void) {
  7559.     /* 10 */ if ( ( bibseen ) ) 
  7560.   {
  7561.     auxerrillegalanother ( 0 ) ; 
  7562.     {
  7563.       auxerrprint () ; 
  7564.       goto lab10 ; 
  7565.     } 
  7566.   } 
  7567.   bibseen = true ; 
  7568.   while ( ( buffer [ bufptr2 ] != 125 ) ) {
  7569.       
  7570.     incr ( bufptr2 ) ; 
  7571.     if ( ( ! scan2white ( 125 , 44 ) ) ) 
  7572.     {
  7573.       auxerrnorightbracepr () ; 
  7574.       {
  7575.     auxerrprint () ; 
  7576.     goto lab10 ; 
  7577.       } 
  7578.     } 
  7579.     if ( ( lexclass [ buffer [ bufptr2 ] ] == 1 ) ) 
  7580.     {
  7581.       auxerrwhitespaceinar () ; 
  7582.       {
  7583.     auxerrprint () ; 
  7584.     goto lab10 ; 
  7585.       } 
  7586.     } 
  7587.     if ( ( ( last > bufptr2 + 1 ) && ( buffer [ bufptr2 ] == 125 ) ) ) 
  7588.     {
  7589.       auxerrstuffafterrigh () ; 
  7590.       {
  7591.     auxerrprint () ; 
  7592.     goto lab10 ; 
  7593.       } 
  7594.     } 
  7595.     {
  7596.       if ( ( bibptr == maxbibfiles ) ) 
  7597.       {
  7598.     printoverflow () ; 
  7599.     {
  7600.       (void) FPrintF( logfile , "%s%ld¥r",  "number of database files " , (long)maxbibfiles ) ; 
  7601.       (void) FPrintFStdErr( "%s%ld¥r",  "number of database files " , (long)maxbibfiles ) ; 
  7602.     } 
  7603.     longjmp(jmp9998,1) ; 
  7604.       } 
  7605.       biblist [ bibptr ] = hashtext [ strlookup ( buffer , bufptr1 , ( bufptr2 
  7606.       - bufptr1 ) , 6 , true ) ] ; 
  7607.       if ( ( hashfound ) ) 
  7608.       {
  7609.     {
  7610.       (void) ReverseFPuts( logfile ,  "This database file appears more than once: " ) ; 
  7611.       (void) FPrintFStdErr(  "This database file appears more than once: " ) ; 
  7612.     } 
  7613.     printbibname () ; 
  7614.     {
  7615.       auxerrprint () ; 
  7616.       goto lab10 ; 
  7617.     } 
  7618.       } 
  7619.       startname ( biblist [ bibptr ] ) ; 
  7620.       addextension ( sbibextension ) ; 
  7621.       if ( ( ! aopenin ( bibfile [ bibptr ] ) ) ) 
  7622.       {
  7623.     addarea ( sbibarea ) ; 
  7624.     if ( ( ! aopenin ( bibfile [ bibptr ] ) ) ) 
  7625.     {
  7626.       {
  7627.         (void) ReverseFPuts( logfile ,  "I couldn't open database file " ) ; 
  7628.         (void) FPrintFStdErr(  "I couldn't open database file " ) ; 
  7629.       } 
  7630.       printbibname () ; 
  7631.       {
  7632.         auxerrprint () ; 
  7633.         goto lab10 ; 
  7634.       } 
  7635.     } 
  7636.       } 
  7637.     ;
  7638. #ifdef TRACE
  7639.       {
  7640.     outpoolstr ( logfile , biblist [ bibptr ] ) ; 
  7641.       } 
  7642.       {
  7643.     outpoolstr ( logfile , sbibextension ) ; 
  7644.       } 
  7645.       {
  7646.     (void) FPrintF( logfile , "%s¥r",  " is a bibdata file" ) ; 
  7647.       } 
  7648. #endif /* TRACE */
  7649.       incr ( bibptr ) ; 
  7650.     } 
  7651.   } 
  7652.   lab10: ; 
  7653.  
  7654.  
  7655. }
  7656. void auxbibstylecommand (void) {
  7657.     /* 10 */ if ( ( bstseen ) ) 
  7658.   {
  7659.     auxerrillegalanother ( 1 ) ; 
  7660.     {
  7661.       auxerrprint () ; 
  7662.       goto lab10 ; 
  7663.     } 
  7664.   } 
  7665.   bstseen = true ; 
  7666.   incr ( bufptr2 ) ; 
  7667.   if ( ( ! scan1white ( 125 ) ) ) 
  7668.   {
  7669.     auxerrnorightbracepr () ; 
  7670.     {
  7671.       auxerrprint () ; 
  7672.       goto lab10 ; 
  7673.     } 
  7674.   } 
  7675.   if ( ( lexclass [ buffer [ bufptr2 ] ] == 1 ) ) 
  7676.   {
  7677.     auxerrwhitespaceinar () ; 
  7678.     {
  7679.       auxerrprint () ; 
  7680.       goto lab10 ; 
  7681.     } 
  7682.   } 
  7683.   if ( ( last > bufptr2 + 1 ) ) 
  7684.   {
  7685.     auxerrstuffafterrigh () ; 
  7686.     {
  7687.       auxerrprint () ; 
  7688.       goto lab10 ; 
  7689.     } 
  7690.   } 
  7691.   {
  7692.     bststr = hashtext [ strlookup ( buffer , bufptr1 , ( bufptr2 - bufptr1 ) , 
  7693.     5 , true ) ] ; 
  7694.     if ( ( hashfound ) ) 
  7695.     {
  7696.     ;
  7697. #ifdef TRACE
  7698.       printbstname () ; 
  7699. #endif /* TRACE */
  7700.       {
  7701.     {
  7702.       (void) ReverseFPuts( logfile ,  "Already encountered style file" ) ; 
  7703.       (void) FPrintFStdErr(  "Already encountered style file" ) ; 
  7704.     } 
  7705.     printconfusion () ; 
  7706.     longjmp(jmp9998,1) ; 
  7707.       } 
  7708.     } 
  7709.     startname ( bststr ) ; 
  7710.     addextension ( sbstextension ) ; 
  7711.     if ( ( ! aopenin ( bstfile ) ) ) 
  7712.     {
  7713.       addarea ( sbstarea ) ; 
  7714.       if ( ( ! aopenin ( bstfile ) ) ) 
  7715.       {
  7716.     {
  7717.       (void) ReverseFPuts( logfile ,  "I couldn't open style file " ) ; 
  7718.       (void) FPrintFStdErr(  "I couldn't open style file " ) ; 
  7719.     } 
  7720.     printbstname () ; 
  7721.     bststr = 0 ; 
  7722.     {
  7723.       auxerrprint () ; 
  7724.       goto lab10 ; 
  7725.     } 
  7726.       } 
  7727.     } 
  7728.     {
  7729.       (void) ReverseFPuts( logfile ,  "The style file: " ) ; 
  7730.       (void) FPrintFStdErr(  "The style file: " ) ; 
  7731.     } 
  7732.     printbstname () ; 
  7733.   } 
  7734.   lab10: ; 
  7735.  
  7736.  
  7737. }
  7738. void auxcitationcommand (void) {
  7739.     /* 23 10 */ citationseen = true ; 
  7740.   while ( ( buffer [ bufptr2 ] != 125 ) ) {
  7741.       
  7742.     incr ( bufptr2 ) ; 
  7743.     if ( ( ! scan2white ( 125 , 44 ) ) ) 
  7744.     {
  7745.       auxerrnorightbracepr () ; 
  7746.       {
  7747.     auxerrprint () ; 
  7748.     goto lab10 ; 
  7749.       } 
  7750.     } 
  7751.     if ( ( lexclass [ buffer [ bufptr2 ] ] == 1 ) ) 
  7752.     {
  7753.       auxerrwhitespaceinar () ; 
  7754.       {
  7755.     auxerrprint () ; 
  7756.     goto lab10 ; 
  7757.       } 
  7758.     } 
  7759.     if ( ( ( last > bufptr2 + 1 ) && ( buffer [ bufptr2 ] == 125 ) ) ) 
  7760.     {
  7761.       auxerrstuffafterrigh () ; 
  7762.       {
  7763.     auxerrprint () ; 
  7764.     goto lab10 ; 
  7765.       } 
  7766.     } 
  7767.     {
  7768.     ;
  7769. #ifdef TRACE
  7770.       {
  7771.     outtoken ( logfile ) ; 
  7772.       } 
  7773.       {
  7774.     (void) ReverseFPuts( logfile ,  " cite key encountered" ) ; 
  7775.       } 
  7776. #endif /* TRACE */
  7777.       {
  7778.     if ( ( ( bufptr2 - bufptr1 ) == 1 ) ) 
  7779.     if ( ( buffer [ bufptr1 ] == 42 ) ) 
  7780.     {
  7781.     ;
  7782. #ifdef TRACE
  7783.       {
  7784.         (void) FPrintF( logfile , "%s¥r",  "---entire database to be included" ) ; 
  7785.       } 
  7786. #endif /* TRACE */
  7787.       if ( ( allentries ) ) 
  7788.       {
  7789.         {
  7790.           (void) FPrintF( logfile , "%s¥r",  "Multiple inclusions of entire database" ) ; 
  7791.           (void) FPrintFStdErr( "%s¥r",  "Multiple inclusions of entire database" ) ; 
  7792.         } 
  7793.         {
  7794.           auxerrprint () ; 
  7795.           goto lab10 ; 
  7796.         } 
  7797.       } 
  7798.       else {
  7799.           
  7800.         allentries = true ; 
  7801.         allmarker = citeptr ; 
  7802.         goto lab23 ; 
  7803.       } 
  7804.     } 
  7805.       } 
  7806.       tmpptr = bufptr1 ; 
  7807.       while ( ( tmpptr < bufptr2 ) ) {
  7808.       
  7809.     exbuf [ tmpptr ] = buffer [ tmpptr ] ; 
  7810.     incr ( tmpptr ) ; 
  7811.       } 
  7812.       lowercase ( exbuf , bufptr1 , ( bufptr2 - bufptr1 ) ) ; 
  7813.       lcciteloc = strlookup ( exbuf , bufptr1 , ( bufptr2 - bufptr1 ) , 10 , 
  7814.       true ) ; 
  7815.       if ( ( hashfound ) ) 
  7816.       {
  7817.     ;
  7818. #ifdef TRACE
  7819.     {
  7820.       (void) FPrintF( logfile , "%s¥r",  " previously" ) ; 
  7821.     } 
  7822. #endif /* TRACE */
  7823.     dummyloc = strlookup ( buffer , bufptr1 , ( bufptr2 - bufptr1 ) , 9 , 
  7824.     false ) ; 
  7825.     if ( ( ! hashfound ) ) 
  7826.     {
  7827.       {
  7828.         (void) ReverseFPuts( logfile ,  "Case mismatch error between cite keys " ) ; 
  7829.         (void) FPrintFStdErr(  "Case mismatch error between cite keys " ) ; 
  7830.       } 
  7831.       printatoken () ; 
  7832.       {
  7833.         (void) ReverseFPuts( logfile ,  " and " ) ; 
  7834.         (void) FPrintFStdErr(  " and " ) ; 
  7835.       } 
  7836.       printapoolstr ( citelist [ ilkinfo [ ilkinfo [ lcciteloc ] ] ] ) ; 
  7837.       printanewline () ; 
  7838.       {
  7839.         auxerrprint () ; 
  7840.         goto lab10 ; 
  7841.       } 
  7842.     } 
  7843.       } 
  7844.       else {
  7845.       
  7846.     ;
  7847. #ifdef TRACE
  7848.     {
  7849.       (void) FPutC('¥r', logfile );
  7850.     } 
  7851. #endif /* TRACE */
  7852.     citeloc = strlookup ( buffer , bufptr1 , ( bufptr2 - bufptr1 ) , 9 , 
  7853.     true ) ; 
  7854.     if ( ( hashfound ) ) 
  7855.     hashciteconfusion () ; 
  7856.     checkciteoverflow ( citeptr ) ; 
  7857.     citelist [ citeptr ] = hashtext [ citeloc ] ; 
  7858.     ilkinfo [ citeloc ] = citeptr ; 
  7859.     ilkinfo [ lcciteloc ] = citeloc ; 
  7860.     incr ( citeptr ) ; 
  7861.       } 
  7862.     } 
  7863.     lab23: ; 
  7864.   } 
  7865.   lab10: ; 
  7866.  
  7867.  
  7868. }
  7869. void auxinputcommand (void) {
  7870.     /* 10 */ boolean auxextensionok  ; 
  7871.   incr ( bufptr2 ) ; 
  7872.   if ( ( ! scan1white ( 125 ) ) ) 
  7873.   {
  7874.     auxerrnorightbracepr () ; 
  7875.     {
  7876.       auxerrprint () ; 
  7877.       goto lab10 ; 
  7878.     } 
  7879.   } 
  7880.   if ( ( lexclass [ buffer [ bufptr2 ] ] == 1 ) ) 
  7881.   {
  7882.     auxerrwhitespaceinar () ; 
  7883.     {
  7884.       auxerrprint () ; 
  7885.       goto lab10 ; 
  7886.     } 
  7887.   } 
  7888.   if ( ( last > bufptr2 + 1 ) ) 
  7889.   {
  7890.     auxerrstuffafterrigh () ; 
  7891.     {
  7892.       auxerrprint () ; 
  7893.       goto lab10 ; 
  7894.     } 
  7895.   } 
  7896.   {
  7897.     incr ( auxptr ) ; 
  7898.     if ( ( auxptr == auxstacksize ) ) 
  7899.     {
  7900.       printatoken () ; 
  7901.       {
  7902.     (void) ReverseFPuts( logfile ,  ": " ) ; 
  7903.     (void) FPrintFStdErr(  ": " ) ; 
  7904.       } 
  7905.       {
  7906.     printoverflow () ; 
  7907.     {
  7908.       (void) FPrintF( logfile , "%s%ld¥r",  "auxiliary file depth " , (long)auxstacksize ) ; 
  7909.       (void) FPrintFStdErr( "%s%ld¥r",  "auxiliary file depth " , (long)auxstacksize ) ; 
  7910.     } 
  7911.     longjmp(jmp9998,1) ; 
  7912.       } 
  7913.     } 
  7914.     auxextensionok = true ; 
  7915.     if ( ( ( bufptr2 - bufptr1 ) < ( strstart [ sauxextension + 1 ] - strstart 
  7916.     [ sauxextension ] ) ) ) 
  7917.     auxextensionok = false ; 
  7918.     else if ( ( ! streqbuf ( sauxextension , buffer , bufptr2 - ( strstart [ 
  7919.     sauxextension + 1 ] - strstart [ sauxextension ] ) , ( strstart [ 
  7920.     sauxextension + 1 ] - strstart [ sauxextension ] ) ) ) ) 
  7921.     auxextensionok = false ; 
  7922.     if ( ( ! auxextensionok ) ) 
  7923.     {
  7924.       printatoken () ; 
  7925.       {
  7926.     (void) ReverseFPuts( logfile ,  " has a wrong extension" ) ; 
  7927.     (void) FPrintFStdErr(  " has a wrong extension" ) ; 
  7928.       } 
  7929.       decr ( auxptr ) ; 
  7930.       {
  7931.     auxerrprint () ; 
  7932.     goto lab10 ; 
  7933.       } 
  7934.     } 
  7935.     auxlist [ auxptr ] = hashtext [ strlookup ( buffer , bufptr1 , ( bufptr2 - 
  7936.     bufptr1 ) , 3 , true ) ] ; 
  7937.     if ( ( hashfound ) ) 
  7938.     {
  7939.       {
  7940.     (void) ReverseFPuts( logfile ,  "Already encountered file " ) ; 
  7941.     (void) FPrintFStdErr(  "Already encountered file " ) ; 
  7942.       } 
  7943.       printauxname () ; 
  7944.       decr ( auxptr ) ; 
  7945.       {
  7946.     auxerrprint () ; 
  7947.     goto lab10 ; 
  7948.       } 
  7949.     } 
  7950.     {
  7951.       startname ( auxlist [ auxptr ] ) ; 
  7952.       nameptr = namelength ; 
  7953.       while ( ( nameptr <= 1024 ) ) {
  7954.       
  7955.     nameoffile [ nameptr ] = ' ' ; 
  7956.     incr ( nameptr ) ; 
  7957.       } 
  7958.       if ( ( ! aopenin ( auxfile [ auxptr ] ) ) ) 
  7959.       {
  7960.     {
  7961.       (void) ReverseFPuts( logfile ,  "I couldn't open auxiliary file " ) ; 
  7962.       (void) FPrintFStdErr(  "I couldn't open auxiliary file " ) ; 
  7963.     } 
  7964.     printauxname () ; 
  7965.     decr ( auxptr ) ; 
  7966.     {
  7967.       auxerrprint () ; 
  7968.       goto lab10 ; 
  7969.     } 
  7970.       } 
  7971.       {
  7972.     (void) FPrintF( logfile , "%s%ld%s",  "A level-" , (long)auxptr , " auxiliary file: " ) ; 
  7973.     (void) FPrintFStdErr( "%s%ld%s",  "A level-" , (long)auxptr , " auxiliary file: " ) ; 
  7974.       } 
  7975.       printauxname () ; 
  7976.       auxlnstack [ auxptr ] = 0 ; 
  7977.     } 
  7978.   } 
  7979.   lab10: ; 
  7980.  
  7981.  
  7982. }
  7983. void poptheauxstack (void) {
  7984.     aclose ( auxfile [ auxptr ] ) ; 
  7985.   if ( ( auxptr == 0 ) ) 
  7986.   {lab31=1; return;}
  7987.   else decr ( auxptr ) ; 
  7988.  
  7989.  
  7990. }
  7991. void getauxcommandandproc (void) {
  7992.     /* 10 */ bufptr2 = 0 ; 
  7993.   if ( ( ! scan1 ( 123 ) ) ) 
  7994.   goto lab10 ; 
  7995.   commandnum = ilkinfo [ strlookup ( buffer , bufptr1 , ( bufptr2 - bufptr1 ) 
  7996.   , 2 , false ) ] ; 
  7997.   if ( ( hashfound ) ) 
  7998.   switch ( ( commandnum ) ) 
  7999.   {case 0 : 
  8000.     auxbibdatacommand () ; 
  8001.     break ; 
  8002.   case 1 : 
  8003.     auxbibstylecommand () ; 
  8004.     break ; 
  8005.   case 2 : 
  8006.     auxcitationcommand () ; 
  8007.     break ; 
  8008.   case 3 : 
  8009.     auxinputcommand () ; 
  8010.     break ; 
  8011.     default: 
  8012.     {
  8013.       {
  8014.     (void) ReverseFPuts( logfile ,  "Unknown auxiliary-file command" ) ; 
  8015.     (void) FPrintFStdErr(  "Unknown auxiliary-file command" ) ; 
  8016.       } 
  8017.       printconfusion () ; 
  8018.       longjmp(jmp9998,1) ; 
  8019.     } 
  8020.     break ; 
  8021.   } 
  8022.   lab10: ; 
  8023.  
  8024.  
  8025. }
  8026. void lastcheckforauxerror (void) {
  8027.     numcites = citeptr ; 
  8028.   numbibfiles = bibptr ; 
  8029.   if ( ( ! citationseen ) ) 
  8030.   {
  8031.     auxend1errprint () ; 
  8032.     {
  8033.       (void) ReverseFPuts( logfile ,  "¥¥citation commands" ) ; 
  8034.       (void) FPrintFStdErr(  "¥¥citation commands" ) ; 
  8035.     } 
  8036.     auxend2errprint () ; 
  8037.   } 
  8038.   else if ( ( ( numcites == 0 ) && ( ! allentries ) ) ) 
  8039.   {
  8040.     auxend1errprint () ; 
  8041.     {
  8042.       (void) ReverseFPuts( logfile ,  "cite keys" ) ; 
  8043.       (void) FPrintFStdErr(  "cite keys" ) ; 
  8044.     } 
  8045.     auxend2errprint () ; 
  8046.   } 
  8047.   if ( ( ! bibseen ) ) 
  8048.   {
  8049.     auxend1errprint () ; 
  8050.     {
  8051.       (void) ReverseFPuts( logfile ,  "¥¥bibdata command" ) ; 
  8052.       (void) FPrintFStdErr(  "¥¥bibdata command" ) ; 
  8053.     } 
  8054.     auxend2errprint () ; 
  8055.   } 
  8056.   else if ( ( numbibfiles == 0 ) ) 
  8057.   {
  8058.     auxend1errprint () ; 
  8059.     {
  8060.       (void) ReverseFPuts( logfile ,  "database files" ) ; 
  8061.       (void) FPrintFStdErr(  "database files" ) ; 
  8062.     } 
  8063.     auxend2errprint () ; 
  8064.   } 
  8065.   if ( ( ! bstseen ) ) 
  8066.   {
  8067.     auxend1errprint () ; 
  8068.     {
  8069.       (void) ReverseFPuts( logfile ,  "¥¥bibstyle command" ) ; 
  8070.       (void) FPrintFStdErr(  "¥¥bibstyle command" ) ; 
  8071.     } 
  8072.     auxend2errprint () ; 
  8073.   } 
  8074.   else if ( ( bststr == 0 ) ) 
  8075.   {
  8076.     auxend1errprint () ; 
  8077.     {
  8078.       (void) ReverseFPuts( logfile ,  "style file" ) ; 
  8079.       (void) FPrintFStdErr(  "style file" ) ; 
  8080.     } 
  8081.     auxend2errprint () ; 
  8082.   } 
  8083. #include "BibTeX.h"
  8084. #include "BibTeX.p"
  8085. #include "globals.h"
  8086. #include "coerce.h"
  8087.  
  8088. void bibidprint (void) {
  8089.     if ( ( scanresult == 0 ) ) 
  8090.   {
  8091.     (void) ReverseFPuts( logfile ,  "You're missing " ) ; 
  8092.     (void) FPrintFStdErr(  "You're missing " ) ; 
  8093.   } 
  8094.   else if ( ( scanresult == 2 ) ) 
  8095.   {
  8096.     (void) FPrintF( logfile , "%c%c%s",  '"' , xchr [ buffer [ bufptr2 ] ] ,     "¥" immediately follows " ) ; 
  8097.     (void) FPrintFStdErr( "%c%c%s",  '"' , xchr [ buffer [ bufptr2 ] ] ,     "¥" immediately follows " ) ; 
  8098.   } 
  8099.   else idscanningconfusion () ; 
  8100.  
  8101.  
  8102. }
  8103. void bibcmdconfusion (void) {
  8104.     { 
  8105.     {
  8106.       (void) ReverseFPuts( logfile ,  "Unknown database-file command" ) ; 
  8107.       (void) FPrintFStdErr(  "Unknown database-file command" ) ; 
  8108.     } 
  8109.     printconfusion () ; 
  8110.     longjmp(jmp9998,1) ; 
  8111.   } 
  8112.  
  8113.  
  8114. }
  8115. void citekeydisappearedco (void) {
  8116.     { 
  8117.     {
  8118.       (void) ReverseFPuts( logfile ,  "A cite key disappeared" ) ; 
  8119.       (void) FPrintFStdErr(  "A cite key disappeared" ) ; 
  8120.     } 
  8121.     printconfusion () ; 
  8122.     longjmp(jmp9998,1) ; 
  8123.   } 
  8124.  
  8125. void
  8126. #ifdef STDC
  8127. zbadcrossreferencepri (strnumber s ) 
  8128. #else
  8129. zbadcrossreferencepri ( s ) 
  8130. strnumber s ; 
  8131. #endif
  8132. {{
  8133.     
  8134.     (void) ReverseFPuts( logfile ,  "--entry ¥"" ) ; 
  8135.     (void) FPrintFStdErr(  "--entry ¥"" ) ; 
  8136.   } 
  8137.   printapoolstr ( citelist [ citeptr ] ) ; 
  8138.   {
  8139.     (void) FPrintF( logfile , "%c¥r",  '"' ) ; 
  8140.     (void) FPrintFStdErr( "%c¥r",  '"' ) ; 
  8141.   } 
  8142.   {
  8143.     (void) ReverseFPuts( logfile ,  "refers to entry ¥"" ) ; 
  8144.     (void) FPrintFStdErr(  "refers to entry ¥"" ) ; 
  8145.   } 
  8146.   printapoolstr ( s ) ; 
  8147.  
  8148.  
  8149. }
  8150. void nonexistentcrossrefe (void) {
  8151.     { 
  8152.     (void) ReverseFPuts( logfile ,  "A bad cross reference-" ) ; 
  8153.     (void) FPrintFStdErr(  "A bad cross reference-" ) ; 
  8154.   } 
  8155.   badcrossreferencepri ( fieldinfo [ fieldptr ] ) ; 
  8156.   {
  8157.     (void) FPrintF( logfile , "%s%ld¥r",  "¥", (long)which doesn't exist" ) ; 
  8158.     (void) FPrintFStdErr( "%s%ld¥r",  "¥", (long)which doesn't exist" ) ; 
  8159.   } 
  8160.   markerror () ; 
  8161. }
  8162.  
  8163. void
  8164. #ifdef STDC
  8165. zprintmissingentry (strnumber s ) 
  8166. #else
  8167. zprintmissingentry ( s ) 
  8168. strnumber s ; 
  8169. #endif
  8170. {
  8171.     {
  8172.     
  8173.     (void) ReverseFPuts( logfile ,  "Warning--I didn't find a database entry for ¥"" ) ; 
  8174.     (void) FPrintFStdErr(  "Warning--I didn't find a database entry for ¥"" ) ; 
  8175.   } 
  8176.   printapoolstr ( s ) ; 
  8177.   {
  8178.     (void) FPrintF( logfile , "%c¥r",  '"' ) ; 
  8179.     (void) FPrintFStdErr( "%c¥r",  '"' ) ; 
  8180.   } 
  8181.   markwarning () ; 
  8182.  
  8183.  
  8184. }
  8185. void bstexwarnprint (void) {
  8186.     if ( ( messwithentries ) ) 
  8187.   {
  8188.     {
  8189.       (void) ReverseFPuts( logfile ,  " for entry " ) ; 
  8190.       (void) FPrintFStdErr(  " for entry " ) ; 
  8191.     } 
  8192.     printapoolstr ( citelist [ citeptr ] ) ; 
  8193.   } 
  8194.   printanewline () ; 
  8195.   {
  8196.     (void) ReverseFPuts( logfile ,  "while executing-" ) ; 
  8197.     (void) FPrintFStdErr(  "while executing-" ) ; 
  8198.   } 
  8199.   bstlnnumprint () ; 
  8200.   markerror () ; 
  8201.  
  8202.  
  8203. }
  8204. void bstmildexwarnprint (void) {
  8205.     if ( ( messwithentries ) ) 
  8206.   {
  8207.     {
  8208.       (void) ReverseFPuts( logfile ,  " for entry " ) ; 
  8209.       (void) FPrintFStdErr(  " for entry " ) ; 
  8210.     } 
  8211.     printapoolstr ( citelist [ citeptr ] ) ; 
  8212.   } 
  8213.   printanewline () ; 
  8214.   {
  8215.     {
  8216.       (void) ReverseFPuts( logfile ,  "while executing" ) ; 
  8217.       (void) FPrintFStdErr(  "while executing" ) ; 
  8218.     } 
  8219.     bstwarnprint () ; 
  8220.   } 
  8221.  
  8222.  
  8223. }
  8224. void bstcantmesswithentri (void) {
  8225.     { 
  8226.     {
  8227.       (void) ReverseFPuts( logfile ,  "You can't mess with entries here" ) ; 
  8228.       (void) FPrintFStdErr(  "You can't mess with entries here" ) ; 
  8229.     } 
  8230.     bstexwarnprint () ; 
  8231.   } 
  8232.  
  8233.  
  8234. }
  8235. void illeglliteralconfusi (void) {
  8236.     { 
  8237.     {
  8238.       (void) ReverseFPuts( logfile ,  "Illegal literal type" ) ; 
  8239.       (void) FPrintFStdErr(  "Illegal literal type" ) ; 
  8240.     } 
  8241.     printconfusion () ; 
  8242.     longjmp(jmp9998,1) ; 
  8243.   } 
  8244.  
  8245.  
  8246. }
  8247. void unknwnliteralconfusi (void) {
  8248.     { 
  8249.     {
  8250.       (void) ReverseFPuts( logfile ,  "Unknown literal type" ) ; 
  8251.       (void) FPrintFStdErr(  "Unknown literal type" ) ; 
  8252.     } 
  8253.     printconfusion () ; 
  8254.     longjmp(jmp9998,1) ; 
  8255.   } 
  8256.  
  8257. void
  8258. #ifdef STDC
  8259. zprintstklit (integer stklt ,stktype stktp ) 
  8260. #else
  8261. zprintstklit ( stklt , stktp ) 
  8262. integer stklt ; 
  8263. stktype stktp ; 
  8264. #endif
  8265. {switch ( ( stktp ) ) 
  8266.   {case 0 : 
  8267.     {
  8268.       (void) FPrintF( logfile , "%ld%s",  (long)stklt , " is an integer literal" ) ; 
  8269.       (void) FPrintFStdErr( "%ld%s",  (long)stklt , " is an integer literal" ) ; 
  8270.     } 
  8271.     break ; 
  8272.   case 1 : 
  8273.     {
  8274.       {
  8275.     (void) FPutC( '"' , logfile );
  8276.     (void) FPutC( '"' );
  8277.       } 
  8278.       printapoolstr ( stklt ) ; 
  8279.       {
  8280.     (void) ReverseFPuts( logfile ,  "¥" is a string literal" ) ; 
  8281.     (void) FPrintFStdErr(  "¥" is a string literal" ) ; 
  8282.       } 
  8283.     } 
  8284.     break ; 
  8285.   case 2 : 
  8286.     {
  8287.       {
  8288.     (void) FPutC( '`' , logfile );
  8289.     (void) FPutC( '`' );
  8290.       } 
  8291.       printapoolstr ( hashtext [ stklt ] ) ; 
  8292.       {
  8293.     (void) ReverseFPuts( logfile ,  "' is a function literal" ) ; 
  8294.     (void) FPrintFStdErr(  "' is a function literal" ) ; 
  8295.       } 
  8296.     } 
  8297.     break ; 
  8298.   case 3 : 
  8299.     {
  8300.       {
  8301.     (void) FPutC( '`' , logfile );
  8302.     (void) FPutC( '`' );
  8303.       } 
  8304.       printapoolstr ( stklt ) ; 
  8305.       {
  8306.     (void) ReverseFPuts( logfile ,  "' is a missing field" ) ; 
  8307.     (void) FPrintFStdErr(  "' is a missing field" ) ; 
  8308.       } 
  8309.     } 
  8310.     break ; 
  8311.   case 4 : 
  8312.     illeglliteralconfusi () ; 
  8313.     break ; 
  8314.     default: 
  8315.     unknwnliteralconfusi () ; 
  8316.     break ; 
  8317.   } 
  8318.  
  8319.  
  8320. }
  8321. void
  8322. #ifdef STDC
  8323. zprintlit (integer stklt ,stktype stktp ) 
  8324. #else
  8325. zprintlit ( stklt , stktp ) 
  8326. integer stklt ; 
  8327. stktype stktp ; 
  8328. #endif
  8329. {switch ( ( stktp ) ) 
  8330.   {case 0 : 
  8331.     {
  8332.       (void) FPrintF( logfile , "%ld¥r",  (long)stklt ) ; 
  8333.       (void) FPrintFStdErr( "%ld¥r",  (long)stklt ) ; 
  8334.     } 
  8335.     break ; 
  8336.   case 1 : 
  8337.     {
  8338.       printapoolstr ( stklt ) ; 
  8339.       printanewline () ; 
  8340.     } 
  8341.     break ; 
  8342.   case 2 : 
  8343.     {
  8344.       printapoolstr ( hashtext [ stklt ] ) ; 
  8345.       printanewline () ; 
  8346.     } 
  8347.     break ; 
  8348.   case 3 : 
  8349.     {
  8350.       printapoolstr ( stklt ) ; 
  8351.       printanewline () ; 
  8352.     } 
  8353.     break ; 
  8354.   case 4 : 
  8355.     illeglliteralconfusi () ; 
  8356.     break ; 
  8357.     default: 
  8358.     unknwnliteralconfusi () ; 
  8359.     break ; 
  8360.   } 
  8361.  
  8362.  
  8363. }
  8364. void outputbblline (void) {
  8365.     /* 15 10 */ if ( ( outbuflength != 0 ) ) 
  8366.   {
  8367.     while ( ( outbuflength > 0 ) ) if ( ( lexclass [ outbuf [ outbuflength - 1 
  8368.     ] ] == 1 ) ) 
  8369.     decr ( outbuflength ) ; 
  8370.     else goto lab15 ; 
  8371.     lab15: if ( ( outbuflength == 0 ) ) 
  8372.     goto lab10 ; 
  8373.     outbufptr = 0 ; 
  8374.     while ( ( outbufptr < outbuflength ) ) {
  8375.     
  8376.       (void) FPutC( xchr [ outbuf [ outbufptr ] ] ,  bblfile );
  8377.       incr ( outbufptr ) ; 
  8378.     } 
  8379.   } 
  8380.   (void) FPutC('¥r',  bblfile );
  8381.   incr ( bbllinenum ) ; 
  8382.   outbuflength = 0 ; 
  8383.   lab10: ; 
  8384.  
  8385.  
  8386. }
  8387. void bst1printstringsizee (void) {
  8388.     { 
  8389.     (void) ReverseFPuts( logfile ,  "Warning--you've exceeded " ) ; 
  8390.     (void) FPrintFStdErr(  "Warning--you've exceeded " ) ; 
  8391.   } 
  8392.  
  8393.  
  8394. }
  8395. void bst2printstringsizee (void) {
  8396.     { 
  8397.     (void) ReverseFPuts( logfile ,  "-string-size," ) ; 
  8398.     (void) FPrintFStdErr(  "-string-size," ) ; 
  8399.   } 
  8400.   bstmildexwarnprint () ; 
  8401.   {
  8402.     (void) FPrintF( logfile , "%s¥r",  "*Please notify the bibstyle designer*" ) ; 
  8403.     (void) FPrintFStdErr( "%s¥r",  "*Please notify the bibstyle designer*" ) ; 
  8404.   } 
  8405.  
  8406.  
  8407. }
  8408. void
  8409. #ifdef STDC
  8410. zbracesunbalancedcomp (strnumber poplitvar ) 
  8411. #else
  8412. zbracesunbalancedcomp ( poplitvar ) 
  8413. strnumber poplitvar ; 
  8414. #endif
  8415. {{
  8416.     
  8417.     (void) ReverseFPuts( logfile ,  "Warning--¥"" ) ; 
  8418.     (void) FPrintFStdErr(  "Warning--¥"" ) ; 
  8419.   } 
  8420.   printapoolstr ( poplitvar ) ; 
  8421.   {
  8422.     {
  8423.       (void) ReverseFPuts( logfile ,  "¥" isn't a brace-balanced string" ) ; 
  8424.       (void) FPrintFStdErr(  "¥" isn't a brace-balanced string" ) ; 
  8425.     } 
  8426.     bstmildexwarnprint () ; 
  8427.   } 
  8428.  
  8429.  
  8430. }
  8431. void caseconversionconfus (void) {
  8432.     { 
  8433.     {
  8434.       (void) ReverseFPuts( logfile ,  "Unknown type of case conversion" ) ; 
  8435.       (void) FPrintFStdErr(  "Unknown type of case conversion" ) ; 
  8436.     } 
  8437.     printconfusion () ; 
  8438.     longjmp(jmp9998,1) ; 
  8439.   } 
  8440.  
  8441.  
  8442. }
  8443. void traceandstatprinting (void) {
  8444.     
  8445.     ;
  8446. #ifdef TRACE
  8447.   {
  8448.     if ( ( numbibfiles == 1 ) ) 
  8449.     {
  8450.       (void) FPrintF( logfile , "%s¥r",  "The 1 database file is" ) ; 
  8451.     } 
  8452.     else {
  8453.     
  8454.       (void) FPrintF( logfile , "%s%ld%s¥r",  "The " , (long)numbibfiles , " database files are" ) ; 
  8455.     } 
  8456.     if ( ( numbibfiles == 0 ) ) 
  8457.     {
  8458.       (void) FPrintF( logfile , "%s¥r",  "   undefined" ) ; 
  8459.     } 
  8460.     else {
  8461.     
  8462.       bibptr = 0 ; 
  8463.       while ( ( bibptr < numbibfiles ) ) {
  8464.       
  8465.     {
  8466.       (void) ReverseFPuts( logfile ,  "   " ) ; 
  8467.     } 
  8468.     {
  8469.       outpoolstr ( logfile , biblist [ bibptr ] ) ; 
  8470.     } 
  8471.     {
  8472.       outpoolstr ( logfile , sbibextension ) ; 
  8473.     } 
  8474.     {
  8475.       (void) FPutC('¥r', logfile );
  8476.     } 
  8477.     incr ( bibptr ) ; 
  8478.       } 
  8479.     } 
  8480.     {
  8481.       (void) ReverseFPuts( logfile ,  "The style file is " ) ; 
  8482.     } 
  8483.     if ( ( bststr == 0 ) ) 
  8484.     {
  8485.       (void) FPrintF( logfile , "%s¥r",  "undefined" ) ; 
  8486.     } 
  8487.     else {
  8488.     
  8489.       {
  8490.     outpoolstr ( logfile , bststr ) ; 
  8491.       } 
  8492.       {
  8493.     outpoolstr ( logfile , sbstextension ) ; 
  8494.       } 
  8495.       {
  8496.     (void) FPutC('¥r', logfile );
  8497.       } 
  8498.     } 
  8499.   } 
  8500.   {
  8501.     if ( ( allentries ) ) 
  8502.     {
  8503.       (void) FPrintF( logfile , "%s%ld%s",  "all_marker=" , (long)allmarker , ", " ) ; 
  8504.     } 
  8505.     if ( ( readperformed ) ) 
  8506.     {
  8507.       (void) FPrintF( logfile , "%s%ld¥r",  "old_num_cites=" , (long)oldnumcites ) ; 
  8508.     } 
  8509.     else {
  8510.     
  8511.       (void) FPutC('¥r', logfile );
  8512.     } 
  8513.     {
  8514.       (void) FPrintF( logfile , "%s%ld",  "The " , (long)numcites ) ; 
  8515.     } 
  8516.     if ( ( numcites == 1 ) ) 
  8517.     {
  8518.       (void) FPrintF( logfile , "%s¥r",  " entry:" ) ; 
  8519.     } 
  8520.     else {
  8521.     
  8522.       (void) FPrintF( logfile , "%s¥r",  " entries:" ) ; 
  8523.     } 
  8524.     if ( ( numcites == 0 ) ) 
  8525.     {
  8526.       (void) FPrintF( logfile , "%s¥r",  "   undefined" ) ; 
  8527.     } 
  8528.     else {
  8529.     
  8530.       sortciteptr = 0 ; 
  8531.       while ( ( sortciteptr < numcites ) ) {
  8532.       
  8533.     if ( ( ! readcompleted ) ) 
  8534.     citeptr = sortciteptr ; 
  8535.     else citeptr = citeinfo [ sortciteptr ] ; 
  8536.     {
  8537.       outpoolstr ( logfile , citelist [ citeptr ] ) ; 
  8538.     } 
  8539.     if ( ( readperformed ) ) 
  8540.     {
  8541.       {
  8542.         (void) ReverseFPuts( logfile ,  ", entry-type " ) ; 
  8543.       } 
  8544.       if ( ( typelist [ citeptr ] == hashsize+1 ) ) 
  8545.       lab5001: {
  8546.           
  8547.         (void) ReverseFPuts( logfile ,  "unknown" ) ; 
  8548.       } 
  8549.       else if ( ( typelist [ citeptr ] == 0 ) ) 
  8550.       {
  8551.         (void) ReverseFPuts( logfile ,  "--- no type found" ) ; 
  8552.       } 
  8553.       else {
  8554.           
  8555.         outpoolstr ( logfile , hashtext [ typelist [ citeptr ] ] ) ; 
  8556.       } 
  8557.       {
  8558.         (void) FPrintF( logfile , "%s¥r",  ", has entry strings" ) ; 
  8559.       } 
  8560.       {
  8561.         if ( ( numentstrs == 0 ) ) 
  8562.         {
  8563.           (void) FPrintF( logfile , "%s¥r",  "    undefined" ) ; 
  8564.         } 
  8565.         else if ( ( ! readcompleted ) ) 
  8566.         {
  8567.           (void) FPrintF( logfile , "%s¥r",  "    uninitialized" ) ; 
  8568.         } 
  8569.         else {
  8570.         
  8571.           strentptr = citeptr * numentstrs ; 
  8572.           while ( ( strentptr < ( citeptr + 1 ) * numentstrs ) ) {
  8573.           
  8574.         entchrptr = 0 ; 
  8575.         {
  8576.           (void) ReverseFPuts( logfile ,  "    ¥"" ) ; 
  8577.         } 
  8578.         while ( ( entrystrs [ strentptr ] [ entchrptr ] != 127 ) ) {
  8579.             
  8580.           {
  8581.             (void) FPutC( xchr [ entrystrs [ strentptr ] [                     entchrptr ] ] , logfile );
  8582.           } 
  8583.           incr ( entchrptr ) ; 
  8584.         } 
  8585.         {
  8586.           (void) FPrintF( logfile , "%c¥r",  '"' ) ; 
  8587.         } 
  8588.         incr ( strentptr ) ; 
  8589.           } 
  8590.         } 
  8591.       } 
  8592.       {
  8593.         (void) ReverseFPuts( logfile ,  "  has entry integers" ) ; 
  8594.       } 
  8595.       {
  8596.         if ( ( numentints == 0 ) ) 
  8597.         {
  8598.           (void) ReverseFPuts( logfile ,  " undefined" ) ; 
  8599.         } 
  8600.         else if ( ( ! readcompleted ) ) 
  8601.         {
  8602.           (void) ReverseFPuts( logfile ,  " uninitialized" ) ; 
  8603.         } 
  8604.         else {
  8605.         
  8606.           intentptr = citeptr * numentints ; 
  8607.           while ( ( intentptr < ( citeptr + 1 ) * numentints ) ) {
  8608.           
  8609.         {
  8610.           (void) FPrintF( logfile , "%c%ld",  ' ' , (long)entryints [ intentptr ] ) ; 
  8611.         } 
  8612.         incr ( intentptr ) ; 
  8613.           } 
  8614.         } 
  8615.         {
  8616.           (void) FPutC('¥r', logfile );
  8617.         } 
  8618.       } 
  8619.       {
  8620.         (void) FPrintF( logfile , "%s¥r",  "  and has fields" ) ; 
  8621.       } 
  8622.       {
  8623.         if ( ( ! readperformed ) ) 
  8624.         {
  8625.           (void) FPrintF( logfile , "%s¥r",  "    uninitialized" ) ; 
  8626.         } 
  8627.         else {
  8628.         
  8629.           fieldptr = citeptr * numfields ; 
  8630.           fieldendptr = fieldptr + numfields ; 
  8631.           nofields = true ; 
  8632.           while ( ( fieldptr < fieldendptr ) ) {
  8633.           
  8634.         if ( ( fieldinfo [ fieldptr ] != 0 ) ) 
  8635.         {
  8636.           {
  8637.             (void) ReverseFPuts( logfile ,  "    ¥"" ) ; 
  8638.           } 
  8639.           {
  8640.             outpoolstr ( logfile , fieldinfo [ fieldptr ] ) ; 
  8641.           } 
  8642.           {
  8643.             (void) FPrintF( logfile , "%c¥r",  '"' ) ; 
  8644.           } 
  8645.           nofields = false ; 
  8646.         } 
  8647.         incr ( fieldptr ) ; 
  8648.           } 
  8649.           if ( ( nofields ) ) 
  8650.           {
  8651.         (void) FPrintF( logfile , "%s¥r",  "    missing" ) ; 
  8652.           } 
  8653.         } 
  8654.       } 
  8655.     } 
  8656.     else {
  8657.         
  8658.       (void) FPutC('¥r', logfile );
  8659.     } 
  8660.     incr ( sortciteptr ) ; 
  8661.       } 
  8662.     } 
  8663.   } 
  8664.   {
  8665.     {
  8666.       (void) FPrintF( logfile , "%s¥r",  "The wiz-defined functions are" ) ; 
  8667.     } 
  8668.     if ( ( wizdefptr == 0 ) ) 
  8669.     {
  8670.       (void) FPrintF( logfile , "%s¥r",  "   nonexistent" ) ; 
  8671.     } 
  8672.     else {
  8673.     
  8674.       wizfnptr = 0 ; 
  8675.       while ( ( wizfnptr < wizdefptr ) ) {
  8676.       
  8677.     if ( ( wizfunctions [ wizfnptr ] == hashsize+1 ) ) 
  8678.     {
  8679.       (void) FPrintF( logfile , "%ld%s¥r",  (long)wizfnptr , "--end-of-def--" ) ; 
  8680.     } 
  8681.     else if ( ( wizfunctions [ wizfnptr ] == 0 ) ) 
  8682.     {
  8683.       (void) FPrintF( logfile , "%ld%s",  (long)wizfnptr , "  quote_next_function    " ) ; 
  8684.     } 
  8685.     else {
  8686.         
  8687.       {
  8688.         (void) FPrintF( logfile , "%ld%s",  (long)wizfnptr , "  `" ) ; 
  8689.       } 
  8690.       {
  8691.         outpoolstr ( logfile , hashtext [ wizfunctions [ wizfnptr ] ] ) ; 
  8692.       } 
  8693.       {
  8694.         (void) FPrintF( logfile , "%c¥r",  '¥'' ) ; 
  8695.       } 
  8696.     } 
  8697.     incr ( wizfnptr ) ; 
  8698.       } 
  8699.     } 
  8700.   } 
  8701.   {
  8702.     {
  8703.       (void) FPrintF( logfile , "%s¥r",  "The string pool is" ) ; 
  8704.     } 
  8705.     strnum = 1 ; 
  8706.     while ( ( strnum < strptr ) ) {
  8707.     
  8708.       {
  8709.     (void) FPrintF( logfile , "%ld%ld%s",  (long)strnum , (long)strstart [ strnum ] , " ¥"" ) ; 
  8710.       } 
  8711.       {
  8712.     outpoolstr ( logfile , strnum ) ; 
  8713.       } 
  8714.       {
  8715.     (void) FPrintF( logfile , "%c¥r",  '"' ) ; 
  8716.       } 
  8717.       incr ( strnum ) ; 
  8718.     } 
  8719.   } 
  8720. #endif /* TRACE */
  8721.     ;
  8722. #ifdef STAT
  8723.   {
  8724.     {
  8725.       (void) FPrintF( logfile , "%s%ld",  "You've used " , (long)numcites ) ; 
  8726.     } 
  8727.     if ( ( numcites == 1 ) ) 
  8728.     {
  8729.       (void) FPrintF( logfile , "%s¥r",  " entry," ) ; 
  8730.     } 
  8731.     else {
  8732.     
  8733.       (void) FPrintF( logfile , "%s¥r",  " entries," ) ; 
  8734.     } 
  8735.     {
  8736.       (void) FPrintF( logfile , "%s%ld%s¥r",  "            " , (long)wizdefptr ,       " wiz_defined-function locations," ) ; 
  8737.     } 
  8738.     {
  8739.       (void) FPrintF( logfile , "%s%ld%s%ld%s¥r",  "            " , (long)strptr , " strings with " ,       (long)strstart [ strptr ] , " characters," ) ; 
  8740.     } 
  8741.     bltinptr = 0 ; 
  8742.     totalexcount = 0 ; 
  8743.     while ( ( bltinptr < numbltinfns ) ) {
  8744.     
  8745.       totalexcount = totalexcount + executioncount [ bltinptr ] ; 
  8746.       incr ( bltinptr ) ; 
  8747.     } 
  8748.     {
  8749.       (void) FPrintF( logfile , "%s%ld%s¥r",  "and the built_in function-call counts, " ,       (long)totalexcount , " in all, are:" ) ; 
  8750.     } 
  8751.     bltinptr = 0 ; 
  8752.     while ( ( bltinptr < numbltinfns ) ) {
  8753.     
  8754.       {
  8755.     outpoolstr ( logfile , hashtext [ bltinloc [ bltinptr ] ] ) ; 
  8756.       } 
  8757.       {
  8758.     (void) FPrintF( logfile , "%s%ld¥r",  " -- " , (long)executioncount [ bltinptr ] ) ; 
  8759.       } 
  8760.       incr ( bltinptr ) ; 
  8761.     } 
  8762.   } 
  8763. #endif /* STAT */
  8764. #ifdef STDC
  8765. boolean zaopenin (palphafile * f ) 
  8766. #else
  8767. boolean zaopenin ( f ) 
  8768. palphafile * f ; 
  8769. #endif
  8770. {register boolean Result; boolean ok  ; 
  8771.   if ( testaccess ( 4 , 1 ) ) 
  8772.   {
  8773.     reset ( *f , realnameoffile ) ; 
  8774.     ok = true ; 
  8775.   } 
  8776.   else ok = false ; 
  8777.   Result = ok ; 
  8778.   return(Result) ; 
  8779. #ifdef STDC
  8780. boolean zaopenout (palphafile * f ) 
  8781. #else
  8782. boolean zaopenout ( f ) 
  8783. palphafile * f ; 
  8784. #endif
  8785. {register boolean Result; boolean ok  ; 
  8786.   if ( testaccess ( 2 , 0 ) ) 
  8787.   {
  8788.     rewrite ( *f , realnameoffile ) ; 
  8789.     ok = true ; 
  8790.   } 
  8791.   else ok = false ; 
  8792.   Result = ok ; 
  8793.   return(Result) ; 
  8794.  
  8795.  
  8796. }
  8797. void
  8798. #ifdef STDC
  8799. zstartname (strnumber filename ) 
  8800. #else
  8801. zstartname ( filename ) 
  8802. strnumber filename ; 
  8803. #endif
  8804. {poolpointer pptr  ; 
  8805.   if ( ( ( strstart [ filename + 1 ] - strstart [ filename ] ) > 1024 ) ) 
  8806.   {
  8807.     {
  8808.       (void) ReverseFPuts( logfile ,  "File=" ) ; 
  8809.       (void) FPrintFStdErr(  "File=" ) ; 
  8810.     } 
  8811.     printapoolstr ( filename ) ; 
  8812.     {
  8813.       (void) FPrintF( logfile , "%c¥r",  ',' ) ; 
  8814.       (void) FPrintFStdErr( "%c¥r",  ',' ) ; 
  8815.     } 
  8816.     filenmsizeoverflow () ; 
  8817.   } 
  8818.   nameptr = 0 ; 
  8819.   pptr = strstart [ filename ] ; 
  8820.   while ( ( pptr < strstart [ filename + 1 ] ) ) {
  8821.       
  8822.     nameoffile [ nameptr ] = chr ( strpool [ pptr ] ) ; 
  8823.     incr ( nameptr ) ; 
  8824.     incr ( pptr ) ; 
  8825.   } 
  8826.   namelength = ( strstart [ filename + 1 ] - strstart [ filename ] ) ; 
  8827.  
  8828.  
  8829. }
  8830. void
  8831. #ifdef STDC
  8832. zaddextension (strnumber ext ) 
  8833. #else
  8834. zaddextension ( ext ) 
  8835. strnumber ext ; 
  8836. #endif
  8837. {poolpointer pptr  ; 
  8838.   if ( ( namelength + ( strstart [ ext + 1 ] - strstart [ ext ] ) > 1024 ) ) 
  8839.   {
  8840.     {
  8841.       (void) FPrintF( logfile , "%s%c%s",  "File=" , nameoffile , ", extension=" ) ; 
  8842.       (void) FPrintFStdErr( "%s%c%s",  "File=" , nameoffile , ", extension=" ) ; 
  8843.     } 
  8844.     printapoolstr ( ext ) ; 
  8845.     {
  8846.       (void) FPrintF( logfile , "%c¥r",  ',' ) ; 
  8847.       (void) FPrintFStdErr( "%c¥r",  ',' ) ; 
  8848.     } 
  8849.     filenmsizeoverflow () ; 
  8850.   } 
  8851.   nameptr = namelength ; 
  8852.   pptr = strstart [ ext ] ; 
  8853.   while ( ( pptr < strstart [ ext + 1 ] ) ) {
  8854.       
  8855.     nameoffile [ nameptr ] = chr ( strpool [ pptr ] ) ; 
  8856.     incr ( nameptr ) ; 
  8857.     incr ( pptr ) ; 
  8858.   } 
  8859.   namelength = namelength + ( strstart [ ext + 1 ] - strstart [ ext ] ) ; 
  8860.   nameoffile [ namelength ] = ' ' ; 
  8861.  
  8862.  
  8863. }
  8864. void
  8865. #ifdef STDC
  8866. zaddarea (strnumber area ) 
  8867. #else
  8868. zaddarea ( area ) 
  8869. strnumber area ; 
  8870. #endif
  8871. {poolpointer pptr  ; 
  8872.   if ( ( namelength + ( strstart [ area + 1 ] - strstart [ area ] ) > 1024 ) ) 
  8873.   {
  8874.     {
  8875.       (void) ReverseFPuts( logfile ,  "File=" ) ; 
  8876.       (void) FPrintFStdErr(  "File=" ) ; 
  8877.     } 
  8878.     printapoolstr ( area ) ; 
  8879.     printstr ( nameoffile , ',' ) ; 
  8880.     filenmsizeoverflow () ; 
  8881.   } 
  8882.   nameptr = namelength ; 
  8883.   while ( ( nameptr > 0 ) ) {
  8884.       
  8885.     nameoffile [ nameptr + ( strstart [ area + 1 ] - strstart [ area ] ) ] = 
  8886.     nameoffile [ nameptr ] ; 
  8887.     decr ( nameptr ) ; 
  8888.   } 
  8889.   nameptr = 0 ; 
  8890.   pptr = strstart [ area ] ; 
  8891.   while ( ( pptr < strstart [ area + 1 ] ) ) {
  8892.       
  8893.     nameoffile [ nameptr ] = chr ( strpool [ pptr ] ) ; 
  8894.     incr ( nameptr ) ; 
  8895.     incr ( pptr ) ; 
  8896.   } 
  8897.   namelength = namelength + ( strstart [ area + 1 ] - strstart [ area ] ) ; 
  8898. strnumber makestring () {
  8899.     register strnumber Result; if ( ( strptr == 
  8900.   maxstrings ) ) 
  8901.   {
  8902.     printoverflow () ; 
  8903.     {
  8904.       (void) FPrintF( logfile , "%s%ld¥r",  "number of strings " , (long)maxstrings ) ; 
  8905.       (void) FPrintFStdErr( "%s%ld¥r",  "number of strings " , (long)maxstrings ) ; 
  8906.     } 
  8907.     longjmp(jmp9998,1) ; 
  8908.   } 
  8909.   incr ( strptr ) ; 
  8910.   strstart [ strptr ] = poolptr ; 
  8911.   Result = strptr - 1 ; 
  8912.   return(Result) ; 
  8913. #ifdef STDC
  8914. boolean zstreqbuf (strnumber s ,buftype buf ,bufpointer bfptr ,bufpointer len ) 
  8915. #else
  8916. boolean zstreqbuf ( s , buf , bfptr , len ) 
  8917. strnumber s ; 
  8918. buftype buf ; 
  8919. bufpointer bfptr , len ; 
  8920. #endif
  8921. {/* 10 */ register boolean Result; bufpointer i  ; 
  8922.   poolpointer j  ; 
  8923.   if ( ( ( strstart [ s + 1 ] - strstart [ s ] ) != len ) ) 
  8924.   {
  8925.     Result = false ; 
  8926.     goto lab10 ; 
  8927.   } 
  8928.   i = bfptr ; 
  8929.   j = strstart [ s ] ; 
  8930.   while ( ( j < strstart [ s + 1 ] ) ) {
  8931.       
  8932.     if ( ( strpool [ j ] != buf [ i ] ) ) 
  8933.     {
  8934.       Result = false ; 
  8935.       goto lab10 ; 
  8936.     } 
  8937.     incr ( i ) ; 
  8938.     incr ( j ) ; 
  8939.   } 
  8940.   Result = true ; 
  8941.   lab10: ; 
  8942.   return(Result) ; 
  8943. #ifdef STDC
  8944. boolean zstreqstr (strnumber s1 ,strnumber s2 ) 
  8945. #else
  8946. boolean zstreqstr ( s1 , s2 ) 
  8947. strnumber s1 , s2 ; 
  8948. #endif
  8949. {/* 10 */ register boolean Result; if ( ( ( strstart [ s1 + 1 ] - 
  8950.   strstart [ s1 ] ) != ( strstart [ s2 + 1 ] - strstart [ s2 ] ) ) ) 
  8951.   {
  8952.     Result = false ; 
  8953.     goto lab10 ; 
  8954.   } 
  8955.   pptr1 = strstart [ s1 ] ; 
  8956.   pptr2 = strstart [ s2 ] ; 
  8957.   while ( ( pptr1 < strstart [ s1 + 1 ] ) ) {
  8958.       
  8959.     if ( ( strpool [ pptr1 ] != strpool [ pptr2 ] ) ) 
  8960.     {
  8961.       Result = false ; 
  8962.       goto lab10 ; 
  8963.     } 
  8964.     incr ( pptr1 ) ; 
  8965.     incr ( pptr2 ) ; 
  8966.   } 
  8967.   Result = true ; 
  8968.   lab10: ; 
  8969.   return(Result) ; 
  8970.  
  8971.  
  8972. }
  8973. void
  8974. #ifdef STDC
  8975. zlowercase (buftype buf ,bufpointer bfptr ,bufpointer len ) 
  8976. #else
  8977. zlowercase ( buf , bfptr , len ) 
  8978. buftype buf ; 
  8979. bufpointer bfptr , len ; 
  8980. #endif
  8981. {bufpointer i  ; 
  8982.   if ( ( len > 0 ) ) 
  8983.   {register integer for_end; i = bfptr ; for_end = bfptr + len - 1 ; if ( i 
  8984.   <= for_end) do 
  8985.     if ( ( ( buf [ i ] >= 65 ) && ( buf [ i ] <= 90 ) ) ) 
  8986.     buf [ i ] = buf [ i ] + 32 ; 
  8987.   while ( i++ < for_end ) ; } 
  8988.  
  8989.  
  8990. }
  8991. void
  8992. #ifdef STDC
  8993. zuppercase (buftype buf ,bufpointer bfptr ,bufpointer len ) 
  8994. #else
  8995. zuppercase ( buf , bfptr , len ) 
  8996. buftype buf ; 
  8997. bufpointer bfptr , len ; 
  8998. #endif
  8999. {bufpointer i  ; 
  9000.   if ( ( len > 0 ) ) 
  9001.   {register integer for_end; i = bfptr ; for_end = bfptr + len - 1 ; if ( i 
  9002.   <= for_end) do 
  9003.     if ( ( ( buf [ i ] >= 97 ) && ( buf [ i ] <= 122 ) ) ) 
  9004.     buf [ i ] = buf [ i ] - 32 ; 
  9005.   while ( i++ < for_end ) ; } 
  9006. #ifdef STDC
  9007. hashloc zstrlookup (buftype buf ,bufpointer j ,bufpointer l ,strilk ilk ,boolean insertit ) 
  9008. #else
  9009. hashloc zstrlookup ( buf , j , l , ilk , insertit ) 
  9010. buftype buf ; 
  9011. bufpointer j , l ; 
  9012. strilk ilk ; 
  9013. boolean insertit ; 
  9014. #endif
  9015. {/* 40 45 */ register hashloc Result; short h  ; 
  9016.   hashloc p  ; 
  9017.   bufpointer k  ; 
  9018.   boolean oldstring  ; 
  9019.   strnumber strnum  ; 
  9020.  
  9021.   {
  9022.     h = 0 ; 
  9023.     k = j ; 
  9024.     while ( ( k < j + l ) ) {
  9025.     
  9026.       h = h + h + buf [ k ] ; 
  9027.       while ( ( h >= 4253 ) ) h = h - 4253 ; 
  9028.       incr ( k ) ; 
  9029.     } 
  9030.   } 
  9031.   p = h + 1 ; 
  9032.   hashfound = false ; 
  9033.   oldstring = false ; 
  9034.   while ( true ) {
  9035.       
  9036.     {
  9037.       if ( ( hashtext [ p ] > 0 ) ) 
  9038.       if ( ( streqbuf ( hashtext [ p ] , buf , j , l ) ) ) 
  9039.       if ( ( hashilk [ p ] == ilk ) ) 
  9040.       {
  9041.     hashfound = true ; 
  9042.     goto lab40 ; 
  9043.       } 
  9044.       else {
  9045.       
  9046.     oldstring = true ; 
  9047.     strnum = hashtext [ p ] ; 
  9048.       } 
  9049.     } 
  9050.     if ( ( hashnext [ p ] == 0 ) ) 
  9051.     {
  9052.       if ( ( ! insertit ) ) 
  9053.       goto lab45 ; 
  9054.       {
  9055.     if ( ( hashtext [ p ] > 0 ) ) 
  9056.     {
  9057.       do {
  9058.           if ( ( ( hashused == 1 ) ) ) 
  9059.         {
  9060.           printoverflow () ; 
  9061.           {
  9062.         (void) FPrintF( logfile , "%s%ld¥r",  "hash size " , (long)hashsize ) ; 
  9063.         (void) FPrintFStdErr( "%s%ld¥r",  "hash size " , (long)hashsize ) ; 
  9064.           } 
  9065.           longjmp(jmp9998,1) ; 
  9066.         } 
  9067.         decr ( hashused ) ; 
  9068.       } while ( ! ( ( hashtext [ hashused ] == 0 ) ) ) ; 
  9069.       hashnext [ p ] = hashused ; 
  9070.       p = hashused ; 
  9071.     } 
  9072.     if ( ( oldstring ) ) 
  9073.     hashtext [ p ] = strnum ; 
  9074.     else {
  9075.         
  9076.       {
  9077.         if ( ( poolptr + l > poolsize ) ) 
  9078.         pooloverflow () ; 
  9079.       } 
  9080.       k = j ; 
  9081.       while ( ( k < j + l ) ) {
  9082.           
  9083.         {
  9084.           strpool [ poolptr ] = buf [ k ] ; 
  9085.           incr ( poolptr ) ; 
  9086.         } 
  9087.         incr ( k ) ; 
  9088.       } 
  9089.       hashtext [ p ] = makestring () ; 
  9090.     } 
  9091.     hashilk [ p ] = ilk ; 
  9092.       } 
  9093.       goto lab40 ; 
  9094.     } 
  9095.     p = hashnext [ p ] ; 
  9096.   } 
  9097.   lab45: ; 
  9098.   lab40: Result = p ; 
  9099.   return(Result) ; 
  9100.  
  9101.  
  9102. }
  9103. void
  9104. #ifdef STDC
  9105. zpredefine (pdstype pds ,pdslen len ,strilk ilk ) 
  9106. #else
  9107. zpredefine ( pds , len , ilk ) 
  9108. pdstype pds ; 
  9109. pdslen len ; 
  9110. strilk ilk ; 
  9111. #endif
  9112. {pdslen i  ; 
  9113.   {register integer for_end; i = 1 ; for_end = len ; if ( i <= for_end) do 
  9114.     buffer [ i ] = xord [ pds [ i - 1 ] ] ; 
  9115.   while ( i++ < for_end ) ; } 
  9116.   predefloc = strlookup ( buffer , 1 , len , ilk , true ) ; 
  9117.  
  9118.  
  9119. }
  9120. void
  9121. #ifdef STDC
  9122. zinttoASCII (integer inte ,buftype intbuf ,bufpointer intbegin ,bufpointer * intend ) 
  9123. #else
  9124. zinttoASCII ( inte , intbuf , intbegin , intend ) 
  9125. integer inte ; 
  9126. buftype intbuf ; 
  9127. bufpointer intbegin ; 
  9128. bufpointer * intend ; 
  9129. #endif
  9130. {bufpointer intptr, intxptr  ; 
  9131.   ASCIIcode inttmpval  ; 
  9132.   intptr = intbegin ; 
  9133.   if ( ( inte < 0 ) ) 
  9134.   {
  9135.     {
  9136.       if ( ( intptr == bufsize ) ) 
  9137.       bufferoverflow () ; 
  9138.       intbuf [ intptr ] = 45 ; 
  9139.       incr ( intptr ) ; 
  9140.     } 
  9141.     inte = - (integer) inte ; 
  9142.   } 
  9143.   intxptr = intptr ; 
  9144.   do {
  9145.       { 
  9146.       if ( ( intptr == bufsize ) ) 
  9147.       bufferoverflow () ; 
  9148.       intbuf [ intptr ] = 48 + ( inte % 10 ) ; 
  9149.       incr ( intptr ) ; 
  9150.     } 
  9151.     inte = inte / 10 ; 
  9152.   } while ( ! ( ( inte == 0 ) ) ) ; 
  9153. *  intend = intptr ; 
  9154.   decr ( intptr ) ; 
  9155.   while ( ( intxptr < intptr ) ) {
  9156.       
  9157.     inttmpval = intbuf [ intxptr ] ; 
  9158.     intbuf [ intxptr ] = intbuf [ intptr ] ; 
  9159.     intbuf [ intptr ] = inttmpval ; 
  9160.     decr ( intptr ) ; 
  9161.     incr ( intxptr ) ; 
  9162.   } 
  9163.  
  9164.  
  9165. }
  9166. void
  9167. #ifdef STDC
  9168. zadddatabasecite (citenumber * newcite ) 
  9169. #else
  9170. zadddatabasecite ( newcite ) 
  9171. citenumber * newcite ; 
  9172. #endif
  9173. {checkciteoverflow ( *newcite ) ; 
  9174.   checkfieldoverflow ( numfields * *newcite ) ; 
  9175.   citelist [ *newcite ] = hashtext [ citeloc ] ; 
  9176.   ilkinfo [ citeloc ] = *newcite ; 
  9177.   ilkinfo [ lcciteloc ] = citeloc ; 
  9178.   incr ( *newcite ) ; 
  9179. #ifdef STDC
  9180. boolean zfindcitelocsforthisc (strnumber citestr ) 
  9181. #else
  9182. boolean zfindcitelocsforthisc ( citestr ) 
  9183. strnumber citestr ; 
  9184. #endif
  9185. {register boolean Result; exbufptr = 0 ; 
  9186.   tmpptr = strstart [ citestr ] ; 
  9187.   tmpendptr = strstart [ citestr + 1 ] ; 
  9188.   while ( ( tmpptr < tmpendptr ) ) {
  9189.       
  9190.     exbuf [ exbufptr ] = strpool [ tmpptr ] ; 
  9191.     incr ( exbufptr ) ; 
  9192.     incr ( tmpptr ) ; 
  9193.   } 
  9194.   citeloc = strlookup ( exbuf , 0 , ( strstart [ citestr + 1 ] - strstart [ 
  9195.   citestr ] ) , 9 , false ) ; 
  9196.   citehashfound = hashfound ; 
  9197.   lowercase ( exbuf , 0 , ( strstart [ citestr + 1 ] - strstart [ citestr ] ) 
  9198.   ) ; 
  9199.   lcciteloc = strlookup ( exbuf , 0 , ( strstart [ citestr + 1 ] - strstart [ 
  9200.   citestr ] ) , 10 , false ) ; 
  9201.   if ( ( hashfound ) ) 
  9202.   Result = true ; 
  9203.   else Result = false ; 
  9204.   return(Result) ; 
  9205.  
  9206.  
  9207. }
  9208. void
  9209. #ifdef STDC
  9210. zswap (citenumber swap1 ,citenumber swap2 ) 
  9211. #else
  9212. zswap ( swap1 , swap2 ) 
  9213. citenumber swap1 , swap2 ; 
  9214. #endif
  9215. {citenumber innocentbystander  ; 
  9216.   innocentbystander = citeinfo [ swap2 ] ; 
  9217.   citeinfo [ swap2 ] = citeinfo [ swap1 ] ; 
  9218.   citeinfo [ swap1 ] = innocentbystander ; 
  9219. #ifdef STDC
  9220. boolean zlessthan (citenumber arg1 ,citenumber arg2 ) 
  9221. #else
  9222. boolean zlessthan ( arg1 , arg2 ) 
  9223. citenumber arg1 , arg2 ; 
  9224. #endif
  9225. {/* 10 */ register boolean Result; integer charptr  ; 
  9226.   strentloc ptr1, ptr2  ; 
  9227.   ASCIIcode char1, char2  ; 
  9228.   ptr1 = arg1 * numentstrs + sortkeynum ; 
  9229.   ptr2 = arg2 * numentstrs + sortkeynum ; 
  9230.   charptr = 0 ; 
  9231.   while ( true ) {
  9232.       
  9233.     char1 = entrystrs [ ptr1 ] [ charptr ] ; 
  9234.     char2 = entrystrs [ ptr2 ] [ charptr ] ; 
  9235.     if ( ( char1 == 127 ) ) 
  9236.     if ( ( char2 == 127 ) ) 
  9237.     if ( ( arg1 < arg2 ) ) 
  9238.     {
  9239.       Result = true ; 
  9240.       goto lab10 ; 
  9241.     } 
  9242.     else if ( ( arg1 > arg2 ) ) 
  9243.     {
  9244.       Result = false ; 
  9245.       goto lab10 ; 
  9246.     } 
  9247.     else {
  9248.     
  9249.       {
  9250.     (void) ReverseFPuts( logfile ,  "Duplicate sort key" ) ; 
  9251.     (void) FPrintFStdErr(  "Duplicate sort key" ) ; 
  9252.       } 
  9253.       printconfusion () ; 
  9254.       longjmp(jmp9998,1) ; 
  9255.     } 
  9256.     else {
  9257.     
  9258.       Result = true ; 
  9259.       goto lab10 ; 
  9260.     } 
  9261.     else if ( ( char2 == 127 ) ) 
  9262.     {
  9263.       Result = false ; 
  9264.       goto lab10 ; 
  9265.     } 
  9266.     else if ( ( char1 < char2 ) ) 
  9267.     {
  9268.       Result = true ; 
  9269.       goto lab10 ; 
  9270.     } 
  9271.     else if ( ( char1 > char2 ) ) 
  9272.     {
  9273.       Result = false ; 
  9274.       goto lab10 ; 
  9275.     } 
  9276.     incr ( charptr ) ; 
  9277.   } 
  9278.   lab10: ; 
  9279.   return(Result) ; 
  9280.  
  9281.  
  9282. }
  9283. void
  9284. #ifdef STDC
  9285. zquicksort (citenumber leftend ,citenumber rightend ) 
  9286. #else
  9287. zquicksort ( leftend , rightend ) 
  9288. citenumber leftend , rightend ; 
  9289. #endif
  9290. {/* 24 */ citenumber left, right  ; 
  9291.   citenumber insertptr  ; 
  9292.   citenumber middle  ; 
  9293.   citenumber partition  ; 
  9294.     ;
  9295. #ifdef TRACE
  9296.   {
  9297.     (void) FPrintF( logfile , "%s%ld%s%ld¥r",  "Sorting " , (long)leftend , " through " , (long)rightend ) ; 
  9298.   } 
  9299. #endif /* TRACE */
  9300.   if ( ( rightend - leftend < 10 ) ) 
  9301.   {
  9302.     {register integer for_end; insertptr = leftend + 1 ; for_end = rightend 
  9303.     ; if ( insertptr <= for_end) do 
  9304.       {
  9305.     {register integer for_end; right = insertptr ; for_end = leftend + 1 
  9306.     ; if ( right >= for_end) do 
  9307.       {
  9308.         if ( ( lessthan ( citeinfo [ right - 1 ] , citeinfo [ right ] ) ) 
  9309.         ) 
  9310.         goto lab24 ; 
  9311.         swap ( right - 1 , right ) ; 
  9312.       } 
  9313.     while ( right-- > for_end ) ; } 
  9314.     lab24: ; 
  9315.       } 
  9316.     while ( insertptr++ < for_end ) ; } 
  9317.   } 
  9318.   else {
  9319.       
  9320.     {
  9321.       left = leftend + 4 ; 
  9322.       middle = ( leftend + rightend ) / 2 ; 
  9323.       right = rightend - 4 ; 
  9324.       if ( ( lessthan ( citeinfo [ left ] , citeinfo [ middle ] ) ) ) 
  9325.       if ( ( lessthan ( citeinfo [ middle ] , citeinfo [ right ] ) ) ) 
  9326.       swap ( leftend , middle ) ; 
  9327.       else if ( ( lessthan ( citeinfo [ left ] , citeinfo [ right ] ) ) ) 
  9328.       swap ( leftend , right ) ; 
  9329.       else swap ( leftend , left ) ; 
  9330.       else if ( ( lessthan ( citeinfo [ right ] , citeinfo [ middle ] ) ) ) 
  9331.       swap ( leftend , middle ) ; 
  9332.       else if ( ( lessthan ( citeinfo [ right ] , citeinfo [ left ] ) ) ) 
  9333.       swap ( leftend , right ) ; 
  9334.       else swap ( leftend , left ) ; 
  9335.     } 
  9336.     {
  9337.       partition = citeinfo [ leftend ] ; 
  9338.       left = leftend + 1 ; 
  9339.       right = rightend ; 
  9340.       do {
  9341.       while ( ( lessthan ( citeinfo [ left ] , partition ) ) ) incr ( 
  9342.     left ) ; 
  9343.     while ( ( lessthan ( partition , citeinfo [ right ] ) ) ) decr ( right 
  9344.     ) ; 
  9345.     if ( ( left < right ) ) 
  9346.     {
  9347.       swap ( left , right ) ; 
  9348.       incr ( left ) ; 
  9349.       decr ( right ) ; 
  9350.     } 
  9351.       } while ( ! ( ( left == right + 1 ) ) ) ; 
  9352.       swap ( leftend , right ) ; 
  9353.       quicksort ( leftend , right - 1 ) ; 
  9354.       quicksort ( left , rightend ) ; 
  9355.     } 
  9356.   } 
  9357. #include "BibTeX.h"
  9358. #include "BibTeX.p"
  9359. #include "globals.h"
  9360. #include "coerce.h"
  9361.  
  9362. void printanewline (void) {
  9363.     (void) FPutC('¥r', logfile );
  9364.   (void) FPutC('¥r');
  9365.   
  9366.       #ifdef GIVE_UP_TIME
  9367.      give_up_some_time();
  9368.     #endif
  9369. }
  9370. void markwarning (void) {
  9371.     if ( ( history == 1 ) ) 
  9372.   incr ( errcount ) ; 
  9373.   else if ( ( history == 0 ) ) 
  9374.   {
  9375.     history = 1 ; 
  9376.     errcount = 1 ; 
  9377.   } 
  9378.  
  9379.  
  9380. }
  9381. void markerror (void) {
  9382.     if ( ( history < 2 ) ) 
  9383.   {
  9384.     history = 2 ; 
  9385.     errcount = 1 ; 
  9386.   } 
  9387.   else incr ( errcount ) ; 
  9388.  
  9389.  
  9390. }
  9391. void markfatal (void) {
  9392.     history = 3 ; 
  9393.  
  9394.  
  9395. }
  9396. void printoverflow (void) {
  9397.     { 
  9398.     (void) ReverseFPuts( logfile ,  "Sorry---you've exceeded BibTeX's " ) ; 
  9399.     (void) FPrintFStdErr(  "Sorry---you've exceeded BibTeX's " ) ; 
  9400.   } 
  9401.   markfatal () ; 
  9402.  
  9403.  
  9404. }
  9405. void printconfusion (void) {
  9406.     { 
  9407.     (void) FPrintF( logfile , "%s¥r",  "---this can't happen" ) ; 
  9408.     (void) FPrintFStdErr( "%s¥r",  "---this can't happen" ) ; 
  9409.   } 
  9410.   {
  9411.     (void) FPrintF( logfile , "%s¥r",  "*Please notify the BibTeX maintainer*" ) ; 
  9412.     (void) FPrintFStdErr( "%s¥r",  "*Please notify the BibTeX maintainer*" ) ; 
  9413.   } 
  9414.   markfatal () ; 
  9415.  
  9416.  
  9417. }
  9418. void bufferoverflow (void) {
  9419.     { 
  9420.     printoverflow () ; 
  9421.     {
  9422.       (void) FPrintF( logfile , "%s%ld¥r",  "buffer size " , (long)bufsize ) ; 
  9423.       (void) FPrintFStdErr( "%s%ld¥r",  "buffer size " , (long)bufsize ) ; 
  9424.     } 
  9425.     longjmp(jmp9998,1) ; 
  9426.   } 
  9427. #ifdef STDC
  9428. boolean zinputln (alphafile f ) 
  9429. #else
  9430. boolean zinputln ( f ) 
  9431. alphafile f ; 
  9432. #endif
  9433. {/* 15 */ register boolean Result; last = 0 ; 
  9434.   if ( eof ( f ) ) 
  9435.   Result = false ; 
  9436.   else {
  9437.       
  9438.     lineread ( f , bufsize ) ; 
  9439.     if ( last >= bufsize ) 
  9440.     {
  9441.       printoverflow () ; 
  9442.       {
  9443.     (void) FPrintF( logfile , "%s%ld¥r",  "buffer size " , (long)bufsize ) ; 
  9444.     (void) FPrintFStdErr( "%s%ld¥r",  "buffer size " , (long)bufsize ) ; 
  9445.       } 
  9446.       longjmp(jmp9998,1) ; 
  9447.     } 
  9448.     while ( ( last > 0 ) ) if ( lexclass [ buffer [ last - 1 ] ] == 1 ) 
  9449.     decr ( last ) ; 
  9450.     else goto lab15 ; 
  9451.     lab15: Result = true ; 
  9452.   } 
  9453.   return(Result) ; 
  9454.  
  9455.  
  9456. }
  9457.  
  9458. void
  9459. #ifdef STDC
  9460. zoutpoolstr (alphafile f ,strnumber s ) 
  9461. #else
  9462. zoutpoolstr ( f , s ) 
  9463. alphafile f ; 
  9464. strnumber s ; 
  9465. #endif
  9466. {
  9467.     poolpointer i  ; 
  9468.   if ( ( ( s < 0 ) || ( s >= strptr + 3 ) || ( s >= maxstrings ) ) ) 
  9469.   {
  9470.     {
  9471.       (void) FPrintF( logfile , "%s%ld",  "Illegal string number:" , (long)s ) ; 
  9472.       (void) FPrintFStdErr( "%s%ld",  "Illegal string number:" , (long)s ) ; 
  9473.     } 
  9474.     printconfusion () ; 
  9475.     longjmp(jmp9998,1) ; 
  9476.   } 
  9477.   {register integer for_end; i = strstart [ s ] ; for_end = strstart [ s + 1 
  9478.   ] - 1 ; if ( i <= for_end) do 
  9479.     (void) FPutC( xchr [ strpool [ i ] ] ,  f );
  9480.   while ( i++ < for_end ) ; } 
  9481.  
  9482.  
  9483. }
  9484. void
  9485. #ifdef STDC
  9486. zprintapoolstr (strnumber s ) 
  9487. #else
  9488. zprintapoolstr ( s ) 
  9489. strnumber s ; 
  9490. #endif
  9491. {
  9492.  outpoolstr ( stdout , s ) ; 
  9493.   outpoolstr ( logfile , s ) ; 
  9494.  
  9495.  
  9496. }
  9497. void pooloverflow (void) {
  9498.     { 
  9499.     printoverflow () ; 
  9500.     {
  9501.       (void) FPrintF( logfile , "%s%ld¥r",  "pool size " , (long)poolsize ) ; 
  9502.       (void) FPrintFStdErr( "%s%ld¥r",  "pool size " , (long)poolsize ) ; 
  9503.     } 
  9504.     longjmp(jmp9998,1) ; 
  9505.   } 
  9506.  
  9507.  
  9508. }
  9509. void filenmsizeoverflow (void) {
  9510.     { 
  9511.     printoverflow () ; 
  9512.     {
  9513.       (void) FPrintF( logfile , "%s%ld¥r",  "file name size " , (long)1024 ) ; 
  9514.       (void) FPrintFStdErr( "%s%ld¥r",  "file name size " , (long)1024 ) ; 
  9515.     } 
  9516.     longjmp(jmp9998,1) ; 
  9517.   } 
  9518.  
  9519.  
  9520. }
  9521. void
  9522. #ifdef STDC
  9523. zouttoken (alphafile f ) 
  9524. #else
  9525. zouttoken ( f ) 
  9526. alphafile f ; 
  9527. #endif
  9528. {bufpointer i  ; 
  9529.   i = bufptr1 ; 
  9530.   while ( ( i < bufptr2 ) ) {
  9531.       
  9532.     (void) FPutC( xchr [ buffer [ i ] ] ,  f );
  9533.     incr ( i ) ; 
  9534.   } 
  9535.  
  9536.  
  9537. }
  9538. void printatoken (void) {
  9539.     outtoken ( stdout ) ; 
  9540.   outtoken ( logfile ) ; 
  9541.  
  9542.  
  9543. }
  9544. void printbadinputline (void) {
  9545.     bufpointer bfptr  ; 
  9546.   {
  9547.     (void) ReverseFPuts( logfile ,  " : " ) ; 
  9548.     (void) FPrintFStdErr(  " : " ) ; 
  9549.   } 
  9550.   bfptr = 0 ; 
  9551.   while ( ( bfptr < bufptr2 ) ) {
  9552.       
  9553.     if ( ( lexclass [ buffer [ bfptr ] ] == 1 ) ) 
  9554.     {
  9555.       (void) FPutC( xchr [ 32 ] , logfile );
  9556.       (void) FPutC( xchr [ 32 ] );
  9557.     } 
  9558.     else {
  9559.     
  9560.       (void) FPutC( xchr [ buffer [ bfptr ] ] , logfile );
  9561.       (void) FPutC( xchr [ buffer [ bfptr ] ] );
  9562.     } 
  9563.     incr ( bfptr ) ; 
  9564.   } 
  9565.   printanewline () ; 
  9566.   {
  9567.     (void) ReverseFPuts( logfile ,  " : " ) ; 
  9568.     (void) FPrintFStdErr(  " : " ) ; 
  9569.   } 
  9570.   bfptr = 0 ; 
  9571.   while ( ( bfptr < bufptr2 ) ) {
  9572.       
  9573.     {
  9574.       (void) FPutC( xchr [ 32 ] , logfile );
  9575.       (void) FPutC( xchr [ 32 ] );
  9576.     } 
  9577.     incr ( bfptr ) ; 
  9578.   } 
  9579.   bfptr = bufptr2 ; 
  9580.   while ( ( bfptr < last ) ) {
  9581.       
  9582.     if ( ( lexclass [ buffer [ bfptr ] ] == 1 ) ) 
  9583.     {
  9584.       (void) FPutC( xchr [ 32 ] , logfile );
  9585.       (void) FPutC( xchr [ 32 ] );
  9586.     } 
  9587.     else {
  9588.     
  9589.       (void) FPutC( xchr [ buffer [ bfptr ] ] , logfile );
  9590.       (void) FPutC( xchr [ buffer [ bfptr ] ] );
  9591.     } 
  9592.     incr ( bfptr ) ; 
  9593.   } 
  9594.   printanewline () ; 
  9595.   bfptr = 0 ; 
  9596.   while ( ( ( bfptr < bufptr2 ) && ( lexclass [ buffer [ bfptr ] ] == 1 ) ) ) 
  9597.   incr ( bfptr ) ; 
  9598.   if ( ( bfptr == bufptr2 ) ) 
  9599.   {
  9600.     (void) FPrintF( logfile , "%s¥r",  "(Error may have been on previous line)" ) ; 
  9601.     (void) FPrintFStdErr( "%s¥r",  "(Error may have been on previous line)" ) ; 
  9602.   } 
  9603.   markerror () ; 
  9604.  
  9605.  
  9606. }
  9607. void printskippingwhateve (void) {
  9608.     { 
  9609.     (void) ReverseFPuts( logfile ,  "I'm skipping whatever remains of this " ) ; 
  9610.     (void) FPrintFStdErr(  "I'm skipping whatever remains of this " ) ; 
  9611.   } 
  9612.  
  9613.  
  9614. }
  9615. void samtoolongfilenamepr (void) {
  9616.     (void) FPrintFStdErr(  "File name `" ) ; 
  9617.   nameptr = 0 ; 
  9618.   while ( ( nameptr < auxnamelength ) ) {
  9619.       
  9620.     (void) FPutC( nameoffile [ nameptr ] );
  9621.     incr ( nameptr ) ; 
  9622.   } 
  9623.   (void) FPrintFStdErr( "%s¥r",  "' is too long" ) ; 
  9624.  
  9625.  
  9626. }
  9627. void samwrongfilenameprin (void) {
  9628.     (void) FPrintFStdErr(  "I couldn't open file name `" ) ; 
  9629.   nameptr = 0 ; 
  9630.   while ( ( nameptr < namelength ) ) {
  9631.       
  9632.     (void) FPutC( nameoffile [ nameptr ] );
  9633.     incr ( nameptr ) ; 
  9634.   } 
  9635.   (void) FPrintFStdErr( "%c¥r",  '¥'' ) ; 
  9636.  
  9637.  
  9638. }
  9639. void printauxname (void) {
  9640.     printapoolstr ( auxlist [ auxptr ] ) ; 
  9641.   printanewline () ; 
  9642.  
  9643.  
  9644. }
  9645. void auxerrprint (void) {
  9646.     { 
  9647.     (void) FPrintF( logfile , "%s%ld%s",  "---line " , (long)auxlnstack [ auxptr ] , " of file " ) ; 
  9648.     (void) FPrintFStdErr( "%s%ld%s",  "---line " , (long)auxlnstack [ auxptr ] , " of file " ) ; 
  9649.   } 
  9650.   printauxname () ; 
  9651.   printbadinputline () ; 
  9652.   printskippingwhateve () ; 
  9653.   {
  9654.     (void) FPrintF( logfile , "%s¥r",  "command" ) ; 
  9655.     (void) FPrintFStdErr( "%s¥r",  "command" ) ; 
  9656.   } 
  9657.  
  9658.  
  9659. }
  9660. void
  9661. #ifdef STDC
  9662. zauxerrillegalanother (integer cmdnum ) 
  9663. #else
  9664. zauxerrillegalanother ( cmdnum ) 
  9665. integer cmdnum ; 
  9666. #endif
  9667. {{
  9668.     
  9669.     (void) ReverseFPuts( logfile ,  "Illegal, another ¥¥bib" ) ; 
  9670.     (void) FPrintFStdErr(  "Illegal, another ¥¥bib" ) ; 
  9671.   } 
  9672.   switch ( ( cmdnum ) ) 
  9673.   {case 0 : 
  9674.     {
  9675.       (void) ReverseFPuts( logfile ,  "data" ) ; 
  9676.       (void) FPrintFStdErr(  "data" ) ; 
  9677.     } 
  9678.     break ; 
  9679.   case 1 : 
  9680.     {
  9681.       (void) ReverseFPuts( logfile ,  "style" ) ; 
  9682.       (void) FPrintFStdErr(  "style" ) ; 
  9683.     } 
  9684.     break ; 
  9685.     default: 
  9686.     {
  9687.       {
  9688.     (void) ReverseFPuts( logfile ,  "Illegal auxiliary-file command" ) ; 
  9689.     (void) FPrintFStdErr(  "Illegal auxiliary-file command" ) ; 
  9690.       } 
  9691.       printconfusion () ; 
  9692.       longjmp(jmp9998,1) ; 
  9693.     } 
  9694.     break ; 
  9695.   } 
  9696.   {
  9697.     (void) ReverseFPuts( logfile ,  " command" ) ; 
  9698.     (void) FPrintFStdErr(  " command" ) ; 
  9699.   } 
  9700.  
  9701.  
  9702. }
  9703. void auxerrnorightbracepr (void) {
  9704.     { 
  9705.     (void) FPrintF( logfile , "%s%c%c",  "No ¥"" , xchr [ 125 ] , '"' ) ; 
  9706.     (void) FPrintFStdErr( "%s%c%c",  "No ¥"" , xchr [ 125 ] , '"' ) ; 
  9707.   } 
  9708.  
  9709.  
  9710. }
  9711. void auxerrstuffafterrigh (void) {
  9712.     { 
  9713.     (void) FPrintF( logfile , "%s%c%c",  "Stuff after ¥"" , xchr [ 125 ] , '"' ) ; 
  9714.     (void) FPrintFStdErr( "%s%c%c",  "Stuff after ¥"" , xchr [ 125 ] , '"' ) ; 
  9715.   } 
  9716.  
  9717.  
  9718. }
  9719. void auxerrwhitespaceinar (void) {
  9720.     { 
  9721.     (void) ReverseFPuts( logfile ,  "White space in argument" ) ; 
  9722.     (void) FPrintFStdErr(  "White space in argument" ) ; 
  9723.   } 
  9724.  
  9725.  
  9726. }
  9727. void printbibname (void) {
  9728.     printapoolstr ( biblist [ bibptr ] ) ; 
  9729.   printapoolstr ( sbibextension ) ; 
  9730.   printanewline () ; 
  9731.  
  9732.  
  9733. }
  9734. void printbstname (void) {
  9735.     printapoolstr ( bststr ) ; 
  9736.   printapoolstr ( sbstextension ) ; 
  9737.   printanewline () ; 
  9738.  
  9739.  
  9740. }
  9741. void hashciteconfusion (void) {
  9742.     { 
  9743.     {
  9744.       (void) ReverseFPuts( logfile ,  "Cite hash error" ) ; 
  9745.       (void) FPrintFStdErr(  "Cite hash error" ) ; 
  9746.     } 
  9747.     printconfusion () ; 
  9748.     longjmp(jmp9998,1) ; 
  9749.   } 
  9750.  
  9751.  
  9752. }
  9753. void
  9754. #ifdef STDC
  9755. zcheckciteoverflow (citenumber lastcite ) 
  9756. #else
  9757. zcheckciteoverflow ( lastcite ) 
  9758. citenumber lastcite ; 
  9759. #endif
  9760. {if ( ( lastcite == maxcites ) ) 
  9761.   {
  9762.     printapoolstr ( hashtext [ citeloc ] ) ; 
  9763.     {
  9764.       (void) FPrintF( logfile , "%s¥r",  " is the key:" ) ; 
  9765.       (void) FPrintFStdErr( "%s¥r",  " is the key:" ) ; 
  9766.     } 
  9767.     {
  9768.       printoverflow () ; 
  9769.       {
  9770.     (void) FPrintF( logfile , "%s%ld¥r",  "number of cite keys " , (long)maxcites ) ; 
  9771.     (void) FPrintFStdErr( "%s%ld¥r",  "number of cite keys " , (long)maxcites ) ; 
  9772.       } 
  9773.       longjmp(jmp9998,1) ; 
  9774.     } 
  9775.   } 
  9776.  
  9777.  
  9778. }
  9779. void auxend1errprint (void) {
  9780.     { 
  9781.     (void) ReverseFPuts( logfile ,  "I found no " ) ; 
  9782.     (void) FPrintFStdErr(  "I found no " ) ; 
  9783.   } 
  9784.  
  9785.  
  9786. }
  9787. void auxend2errprint (void) {
  9788.     { 
  9789.     (void) ReverseFPuts( logfile ,  "---while reading file " ) ; 
  9790.     (void) FPrintFStdErr(  "---while reading file " ) ; 
  9791.   } 
  9792.   printauxname () ; 
  9793.   markerror () ; 
  9794.  
  9795.  
  9796. }
  9797. void bstlnnumprint (void) {
  9798.     { 
  9799.     (void) FPrintF( logfile , "%s%ld%s",  "--line " , (long)bstlinenum , " of file " ) ; 
  9800.     (void) FPrintFStdErr( "%s%ld%s",  "--line " , (long)bstlinenum , " of file " ) ; 
  9801.   } 
  9802.   printbstname () ; 
  9803.  
  9804.  
  9805. }
  9806. void bsterrprintandlookfo (void) {
  9807.     { 
  9808.     (void) FPutC( '-' , logfile );
  9809.     (void) FPutC( '-' );
  9810.   } 
  9811.   bstlnnumprint () ; 
  9812.   printbadinputline () ; 
  9813.   while ( ( last != 0 ) ) if ( ( ! inputln ( bstfile ) ) ) 
  9814.   longjmp(jmp32,1) ; 
  9815.   else incr ( bstlinenum ) ; 
  9816.   bufptr2 = last ; 
  9817.  
  9818.  
  9819. }
  9820. void bstwarnprint (void) {
  9821.     bstlnnumprint () ; 
  9822.   markwarning () ; 
  9823.  
  9824.  
  9825. }
  9826. void eatbstprint (void) {
  9827.     { 
  9828.     (void) ReverseFPuts( logfile ,  "Illegal end of style file in command: " ) ; 
  9829.     (void) FPrintFStdErr(  "Illegal end of style file in command: " ) ; 
  9830.   } 
  9831.  
  9832.  
  9833. }
  9834. void unknwnfunctionclassc (void) {
  9835.     { 
  9836.     {
  9837.       (void) ReverseFPuts( logfile ,  "Unknown function class" ) ; 
  9838.       (void) FPrintFStdErr(  "Unknown function class" ) ; 
  9839.     } 
  9840.     printconfusion () ; 
  9841.     longjmp(jmp9998,1) ; 
  9842.   } 
  9843.  
  9844.  
  9845. }
  9846. void
  9847. #ifdef STDC
  9848. zprintfnclass (hashloc fnloc ) 
  9849. #else
  9850. zprintfnclass ( fnloc ) 
  9851. hashloc fnloc ; 
  9852. #endif
  9853. {switch ( ( fntype [ fnloc ] ) ) 
  9854.   {case 0 : 
  9855.     {
  9856.       (void) ReverseFPuts( logfile ,  "built-in" ) ; 
  9857.       (void) FPrintFStdErr(  "built-in" ) ; 
  9858.     } 
  9859.     break ; 
  9860.   case 1 : 
  9861.     {
  9862.       (void) ReverseFPuts( logfile ,  "wizard-defined" ) ; 
  9863.       (void) FPrintFStdErr(  "wizard-defined" ) ; 
  9864.     } 
  9865.     break ; 
  9866.   case 2 : 
  9867.     {
  9868.       (void) ReverseFPuts( logfile ,  "integer-literal" ) ; 
  9869.       (void) FPrintFStdErr(  "integer-literal" ) ; 
  9870.     } 
  9871.     break ; 
  9872.   case 3 : 
  9873.     {
  9874.       (void) ReverseFPuts( logfile ,  "string-literal" ) ; 
  9875.       (void) FPrintFStdErr(  "string-literal" ) ; 
  9876.     } 
  9877.     break ; 
  9878.   case 4 : 
  9879.     {
  9880.       (void) ReverseFPuts( logfile ,  "field" ) ; 
  9881.       (void) FPrintFStdErr(  "field" ) ; 
  9882.     } 
  9883.     break ; 
  9884.   case 5 : 
  9885.     {
  9886.       (void) ReverseFPuts( logfile ,  "integer-entry-variable" ) ; 
  9887.       (void) FPrintFStdErr(  "integer-entry-variable" ) ; 
  9888.     } 
  9889.     break ; 
  9890.   case 6 : 
  9891.     {
  9892.       (void) ReverseFPuts( logfile ,  "string-entry-variable" ) ; 
  9893.       (void) FPrintFStdErr(  "string-entry-variable" ) ; 
  9894.     } 
  9895.     break ; 
  9896.   case 7 : 
  9897.     {
  9898.       (void) ReverseFPuts( logfile ,  "integer-global-variable" ) ; 
  9899.       (void) FPrintFStdErr(  "integer-global-variable" ) ; 
  9900.     } 
  9901.     break ; 
  9902.   case 8 : 
  9903.     {
  9904.       (void) ReverseFPuts( logfile ,  "string-global-variable" ) ; 
  9905.       (void) FPrintFStdErr(  "string-global-variable" ) ; 
  9906.     } 
  9907.     break ; 
  9908.     default: 
  9909.     unknwnfunctionclassc () ; 
  9910.     break ; 
  9911.   } 
  9912. #ifdef TRACE
  9913. void
  9914. #ifdef STDC
  9915. ztraceprfnclass (hashloc fnloc ) 
  9916. #else
  9917. ztraceprfnclass ( fnloc ) 
  9918. hashloc fnloc ; 
  9919. #endif
  9920. {
  9921.     switch ( ( fntype [ fnloc ] ) ) 
  9922.   {case 0 : 
  9923.     {
  9924.       (void) ReverseFPuts( logfile ,  "built-in" ) ; 
  9925.     } 
  9926.     break ; 
  9927.   case 1 : 
  9928.     {
  9929.       (void) ReverseFPuts( logfile ,  "wizard-defined" ) ; 
  9930.     } 
  9931.     break ; 
  9932.   case 2 : 
  9933.     {
  9934.       (void) ReverseFPuts( logfile ,  "integer-literal" ) ; 
  9935.     } 
  9936.     break ; 
  9937.   case 3 : 
  9938.     {
  9939.       (void) ReverseFPuts( logfile ,  "string-literal" ) ; 
  9940.     } 
  9941.     break ; 
  9942.   case 4 : 
  9943.     {
  9944.       (void) ReverseFPuts( logfile ,  "field" ) ; 
  9945.     } 
  9946.     break ; 
  9947.   case 5 : 
  9948.     {
  9949.       (void) ReverseFPuts( logfile ,  "integer-entry-variable" ) ; 
  9950.     } 
  9951.     break ; 
  9952.   case 6 : 
  9953.     {
  9954.       (void) ReverseFPuts( logfile ,  "string-entry-variable" ) ; 
  9955.     } 
  9956.     break ; 
  9957.   case 7 : 
  9958.     {
  9959.       (void) ReverseFPuts( logfile ,  "integer-global-variable" ) ; 
  9960.     } 
  9961.     break ; 
  9962.   case 8 : 
  9963.     {
  9964.       (void) ReverseFPuts( logfile ,  "string-global-variable" ) ; 
  9965.     } 
  9966.     break ; 
  9967.     default: 
  9968.     unknwnfunctionclassc () ; 
  9969.     break ; 
  9970.   } 
  9971. #endif /* TRACE */
  9972. void idscanningconfusion (void) {
  9973.     { 
  9974.     {
  9975.       (void) ReverseFPuts( logfile ,  "Identifier scanning error" ) ; 
  9976.       (void) FPrintFStdErr(  "Identifier scanning error" ) ; 
  9977.     } 
  9978.     printconfusion () ; 
  9979.     longjmp(jmp9998,1) ; 
  9980.   } 
  9981.  
  9982.  
  9983. }
  9984. void bstidprint (void) {
  9985.     if ( ( scanresult == 0 ) ) 
  9986.   {
  9987.     (void) FPrintF( logfile , "%c%c%s%ld",  '"' , xchr [ buffer [ bufptr2 ] ] ,     "¥" begins identifier, (long)command: " ) ; 
  9988.     (void) FPrintFStdErr( "%c%c%s%ld",  '"' , xchr [ buffer [ bufptr2 ] ] ,     "¥" begins identifier, (long)command: " ) ; 
  9989.   } 
  9990.   else if ( ( scanresult == 2 ) ) 
  9991.   {
  9992.     (void) FPrintF( logfile , "%c%c%s%ld",  '"' , xchr [ buffer [ bufptr2 ] ] ,     "¥" immediately follows identifier, (long)command: " ) ; 
  9993.     (void) FPrintFStdErr( "%c%c%s%ld",  '"' , xchr [ buffer [ bufptr2 ] ] ,     "¥" immediately follows identifier, (long)command: " ) ; 
  9994.   } 
  9995.   else idscanningconfusion () ; 
  9996.  
  9997.  
  9998. }
  9999. void bstleftbraceprint (void) {
  10000.     { 
  10001.     (void) FPrintF( logfile , "%c%c%s",  '"' , xchr [ 123 ] , "¥" is missing in command: " ) ; 
  10002.     (void) FPrintFStdErr( "%c%c%s",  '"' , xchr [ 123 ] , "¥" is missing in command: " ) ; 
  10003.   } 
  10004.  
  10005.  
  10006. }
  10007. void bstrightbraceprint (void) {
  10008.     { 
  10009.     (void) FPrintF( logfile , "%c%c%s",  '"' , xchr [ 125 ] , "¥" is missing in command: " ) ; 
  10010.     (void) FPrintFStdErr( "%c%c%s",  '"' , xchr [ 125 ] , "¥" is missing in command: " ) ; 
  10011.   } 
  10012.  
  10013.  
  10014. }
  10015. void
  10016. #ifdef STDC
  10017. zalreadyseenfunctionp (hashloc seenfnloc ) 
  10018. #else
  10019. zalreadyseenfunctionp ( seenfnloc ) 
  10020. hashloc seenfnloc ; 
  10021. #endif
  10022. {/* 10 */ printapoolstr ( hashtext [ seenfnloc ] ) ; 
  10023.   {
  10024.     (void) ReverseFPuts( logfile ,  " is already a type ¥"" ) ; 
  10025.     (void) FPrintFStdErr(  " is already a type ¥"" ) ; 
  10026.   } 
  10027.   printfnclass ( seenfnloc ) ; 
  10028.   {
  10029.     (void) FPrintF( logfile , "%s¥r",  "¥" function name" ) ; 
  10030.     (void) FPrintFStdErr( "%s¥r",  "¥" function name" ) ; 
  10031.   } 
  10032.   {
  10033.     bsterrprintandlookfo () ; 
  10034.     goto lab10 ; 
  10035.   } 
  10036.   lab10: ; 
  10037.  
  10038.  
  10039. }
  10040. void singlfnoverflow (void) {
  10041.     { 
  10042.     printoverflow () ; 
  10043.     {
  10044.       (void) FPrintF( logfile , "%s%ld¥r",  "single function space " , (long)singlefnspace ) ; 
  10045.       (void) FPrintFStdErr( "%s%ld¥r",  "single function space " , (long)singlefnspace ) ; 
  10046.     } 
  10047.     longjmp(jmp9998,1) ; 
  10048.   } 
  10049.  
  10050.  
  10051. }
  10052. void biblnnumprint (void) {
  10053.     { 
  10054.     (void) FPrintF( logfile , "%s%ld%s",  "--line " , (long)biblinenum , " of file " ) ; 
  10055.     (void) FPrintFStdErr( "%s%ld%s",  "--line " , (long)biblinenum , " of file " ) ; 
  10056.   } 
  10057.   printbibname () ; 
  10058.  
  10059.  
  10060. }
  10061. void biberrprint (void) {
  10062.     { 
  10063.     (void) FPutC( '-' , logfile );
  10064.     (void) FPutC( '-' );
  10065.   } 
  10066.   biblnnumprint () ; 
  10067.   printbadinputline () ; 
  10068.   printskippingwhateve () ; 
  10069.   if ( ( atbibcommand ) ) 
  10070.   {
  10071.     (void) FPrintF( logfile , "%s¥r",  "command" ) ; 
  10072.     (void) FPrintFStdErr( "%s¥r",  "command" ) ; 
  10073.   } 
  10074.   else {
  10075.       
  10076.     (void) FPrintF( logfile , "%s¥r",  "entry" ) ; 
  10077.     (void) FPrintFStdErr( "%s¥r",  "entry" ) ; 
  10078.   } 
  10079.  
  10080.  
  10081. }
  10082. void bibwarnprint (void) {
  10083.     biblnnumprint () ; 
  10084.   markwarning () ; 
  10085.  
  10086.  
  10087. }
  10088. void
  10089. #ifdef STDC
  10090. zcheckfieldoverflow (integer totalfields ) 
  10091. #else
  10092. zcheckfieldoverflow ( totalfields ) 
  10093. integer totalfields ; 
  10094. #endif
  10095. {if ( ( totalfields > maxfields ) ) 
  10096.   {
  10097.     {
  10098.       (void) FPrintF( logfile , "%ld%s¥r",  (long)totalfields , " fields:" ) ; 
  10099.       (void) FPrintFStdErr( "%ld%s¥r",  (long)totalfields , " fields:" ) ; 
  10100.     } 
  10101.     {
  10102.       printoverflow () ; 
  10103.       {
  10104.     (void) FPrintF( logfile , "%s%ld¥r",  "total number of fields " , (long)maxfields ) ; 
  10105.     (void) FPrintFStdErr( "%s%ld¥r",  "total number of fields " , (long)maxfields ) ; 
  10106.       } 
  10107.       longjmp(jmp9998,1) ; 
  10108.     } 
  10109.   } 
  10110.  
  10111.  
  10112. }
  10113. void eatbibprint (void) {
  10114.     /* 10 */ { 
  10115.     {
  10116.       (void) ReverseFPuts( logfile ,  "Illegal end of database file" ) ; 
  10117.       (void) FPrintFStdErr(  "Illegal end of database file" ) ; 
  10118.     } 
  10119.     biberrprint () ; 
  10120.     goto lab10 ; 
  10121.   } 
  10122.   lab10: ; 
  10123.  
  10124.  
  10125. }
  10126. void
  10127. #ifdef STDC
  10128. zbiboneoftwoprint (ASCIIcode char1 ,ASCIIcode char2 ) 
  10129. #else
  10130. zbiboneoftwoprint ( char1 , char2 ) 
  10131. ASCIIcode char1 , char2 ; 
  10132. #endif
  10133. {/* 10 */ {
  10134.     
  10135.     {
  10136.       (void) FPrintF( logfile , "%s%c%s%c%c",  "I was expecting a `" , xchr [ char1 ] , "' or a `" ,       xchr [ char2 ] , '¥'' ) ; 
  10137.       (void) FPrintFStdErr( "%s%c%s%c%c",  "I was expecting a `" , xchr [ char1 ] , "' or a `" ,       xchr [ char2 ] , '¥'' ) ; 
  10138.     } 
  10139.     biberrprint () ; 
  10140.     goto lab10 ; 
  10141.   } 
  10142.   lab10: ; 
  10143.  
  10144.  
  10145. }
  10146. void bibequalssignprint (void) {
  10147.     /* 10 */ { 
  10148.     {
  10149.       (void) FPrintF( logfile , "%s%c%c",  "I was expecting an ¥"" , xchr [ 61 ] , '"' ) ; 
  10150.       (void) FPrintFStdErr( "%s%c%c",  "I was expecting an ¥"" , xchr [ 61 ] , '"' ) ; 
  10151.     } 
  10152.     biberrprint () ; 
  10153.     goto lab10 ; 
  10154.   } 
  10155.   lab10: ; 
  10156.  
  10157.  
  10158. }
  10159. void bibunbalancedbracesp (void) {
  10160.     /* 10 */ { 
  10161.     {
  10162.       (void) ReverseFPuts( logfile ,  "Unbalanced braces" ) ; 
  10163.       (void) FPrintFStdErr(  "Unbalanced braces" ) ; 
  10164.     } 
  10165.     biberrprint () ; 
  10166.     goto lab10 ; 
  10167.   } 
  10168.   lab10: ; 
  10169.  
  10170.  
  10171. }
  10172. void bibfieldtoolongprint (void) {
  10173.     /* 10 */ { 
  10174.     {
  10175.       (void) FPrintF( logfile , "%s%ld%s",  "Your field is more than " , (long)bufsize , " characters" ) 
  10176.       ; 
  10177.       (void) FPrintFStdErr( "%s%ld%s",  "Your field is more than " , (long)bufsize , " characters" ) 
  10178.       ; 
  10179.     } 
  10180.     biberrprint () ; 
  10181.     goto lab10 ; 
  10182.   } 
  10183.   lab10: ; 
  10184.  
  10185.  
  10186. }
  10187. void macrowarnprint (void) {
  10188.     { 
  10189.     (void) ReverseFPuts( logfile ,  "Warning--string name ¥"" ) ; 
  10190.     (void) FPrintFStdErr(  "Warning--string name ¥"" ) ; 
  10191.   } 
  10192.   printatoken () ; 
  10193.   {
  10194.     (void) ReverseFPuts( logfile ,  "¥" is " ) ; 
  10195.     (void) FPrintFStdErr(  "¥" is " ) ; 
  10196.   } 
  10197.  
  10198. #pragma profile reset
  10199.